I have one TextBox1 and TextBox2 on a webform1.aspx where the TextBox2.Enabled=False
TextBox1.autopostback=False
Now if the length of Textbox.Text>2
ie.,
if len(Textbox1.text)>2 then 'I wanted the
TextBox2.Enabled=True
else
TextBox2.Enabled=False
end if
ie I wanted to Enable/disable TextBox1 with out Changing the AutoPostBack to True
TextBox1 and TextBox2 are all Serverside VB Controls
Which event I should use ? and How can I execute that event with out
Changing the AutoPostBack to True I mean with out POSting to Server
Any one having an Idea ...plzz..hlp me...
Thanks in adv.
You're saying that if the length of the textbox is > 2 then you want to enable the textbox, how will the user enter theses characters if it was disabled to begin with?
Unless you are populating the textbox from the server? If so then the following should work.
Visual Basic:
if textbox1.text.length > 2 then
textbox1.enabled =true
else
textbox1.enabled =false
end if
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.