|
Hi,
Now i am here with a simple query. I would like to restrict the user input like this "10:00:00 AM". Even if i tried some methods in custom expresions in regular expression validator, i did't got it. will anybody give the correct expression
thanking you in advance
sebastian
|
|
|
|
|
How you want the input to be ?
|
|
|
|
|
User will get a textbox to type in the time
user is suppossed to enter like this "10:00:00 AM" or "11:00:00 PM".
is it possible?
thanks for your reply
sebastian
|
|
|
|
|
In this case, since that is so specific, use 4 drop downs or a date time picker set to show the time in that format.
CleaKO
"I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that.'" - Tommy (Tommy Boy) "Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)
|
|
|
|
|
hi
i want to declare width and height for webform.
or how to resize the webform
i recived your code----
window.open("test.aspx","POPUP","height=500, width=700,status= no, resizable= yes, scrollbars=yes, toolbar=no,location=no,menubar=no,left=200,top=250,directories=no ");
but where i write it ?
i want it on when i write security code in textbox that time this widow will open.
pls help me.
Gayatri
Gayatri
|
|
|
|
|
when u write some text in your textbox u want to open the pop up window right ?
for that u can right one function in java script and call function ontextchaged event of your textbox.
window.open("test.aspx","POPUP","height=500, width=700,status= no, resizable= yes, scrollbars=yes, toolbar=no,location=no,menubar=no,left=200,top=250,directories=no ");
it will open pop up window now specify height=as u need and same way for widht in above code line.
Thanks,
Sun Rays
|
|
|
|
|
That code is java script. If you are going to have your code behind send that to the aspx form you need to do a RegisterClientScriptBlock.
If you are using .net 1.1 then the code is like this:
uses System.Text;
...
StringBuilder scriptString.Append("");
scriptString.Append("window.open('test.aspx','POPUP','height=500, width=700,status= no, resizable= yes, scrollbars=yes, toolbar=no,location=no,menubar=no,left=200,top=250,directories=no ');");
scriptString.Append(@"");
RegisterClientScriptBlock("clientScript", scriptString.ToString);
if you are using .net 2.0:
uses System.Text;
...
// Get a ClientScriptManager reference from the Page class.
ClientScriptManager cs = Page.ClientScript;
Type cstype = this.GetType();
StringBuilder scriptString.Append("");
scriptString.Append("window.open('test.aspx','POPUP','height=500, width=700,status= no, resizable= yes, scrollbars=yes, toolbar=no,location=no,menubar=no,left=200,top=250,directories=no ');");
scriptString.Append(@"");
cs.RegisterStartupScript(cstype, "new Window", scriptString.ToString(), true);
Hope that helps.
Ben
|
|
|
|
|
Try a different subject line. Very Urgent is more likely to be ignored by those who would be must helpful.
only two letters away from being an asset
|
|
|
|
|
Can i send data through querystring and body using HTTP POST method?
mads
|
|
|
|
|
The GET method passes the data through the querystring whereas the POST passes it through the form.
|
|
|
|
|
crazy_mads wrote: What is the difference between HTTP GET and POST method?
Get means all informations send by the browser is visible. In post the information is hidden.
crazy_mads wrote: Can i send data through querystring and body using HTTP POST method?
What do u mean by body ?
|
|
|
|
|
<br />
function GetData()<br />
{<br />
<br />
var url='AJAX.aspx';<br />
<br />
<br />
var reqdBox = GetObject('txtOrderNumber','input');<br />
<br />
<br />
url = url + '?Data=' + reqdBox.value;<br />
<br />
<br />
oxmlhttp.open("GET",url,true);<br />
<br />
<br />
<br />
oxmlhttp.send(null);<br />
<br />
<br />
Now here, when i call oxmlhttp.open("GET",url,true); method, instead of using "GET" can i use "POST" and still send Data=' + reqdBox.value; as a Querystring.
Mads
|
|
|
|
|
Sorry i made mistake
Now here, can i call oxmlhttp.open("GET",url,true); method, instead of using "GET" can i use "POST" and still send Data=' + reqdBox.value; as a Querystring.
Mads
|
|
|
|
|
|
I am able to add controls at runtime but i am not able to specify the height and width of the control.How can i do it ?
Mohinder Singh
|
|
|
|
|
You should be able to. Please provide an example of what you've done.
|
|
|
|
|
Its very simple you have height and width property to control
e.g for TextBox
TextBox txt = new TextBox();
txt.ID = "ControlID"
txt.Width = 50;
txt.Height = 23;
panelSample.Controls.Add(txt);
if you don't have then use style sheet i.e css file and give class name to cssClass property of the control
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
sandeep akhare wrote: txt.Width = 50;
txt.Height = 23;
try: txt.Height = new Unit(UnitType.pixel, 50.00);
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
OOPS thanks for corrections
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
Please help me out dear i am not able to get the output .
Mohinder Singh
|
|
|
|
|
when i see the width of textbox in the property window it shows 245px. Px is for pixels.
Mohinder Singh
|
|
|
|
|
hi dear i am doing this but the textbox is not being shown in the form.
Dim txt as textbox
Txt = New TextBox
Txt.ID = "SubmitBtn"
Txt.TextMode = TextBoxMode.MultiLine
Txt.Height = New Unit(UnitType.Pixel, 24.0)
Txt.Width = New Unit(UnitType.Pixel, 250)
PlaceHolder1.Controls.Add(Txt)
I am using place holder. when i dont give any height and width i get the textbox but it is small. and i want a bigger textbox.
Mohinder Singh
|
|
|
|
|
Hi, I want to create a custom textbox control in ASP.Net using C#, which extends the properties of the normal textbox control and it only allows numeric, alphabetic and alphanumeric characters depending upon the users choice. It should have a built-in client side validation for the same. Also, it should have a property called required, which when set to true, the text box also shows the property of the required field validator.
-----Have A Nice Day-----
|
|
|
|
|
What have you done so far? Anything?
|
|
|
|
|
Yes, I tried and found out that I would need to override the OnKeyPress method to track the keys and show the messages correspondingly, but, this OnKeyPress method is for Windows forms and I want it for Web.
-----Have A Nice Day-----
|
|
|
|