Textbox text changed/ Keypress event
-
Can a code work in the Textbox Keypress event. I want action perfomed when a key is pressed in a text box. It worked in C#/VB.net but not in ASP. HOW? VALIDATION
onyang2 wrote:
Can a code work in the Textbox Keypress event.
Yes. What code are you talking about? A server side code? You need to enable
AutoPostback
for that.Navaneeth How to use google | Ask smart questions
-
Can a code work in the Textbox Keypress event. I want action perfomed when a key is pressed in a text box. It worked in C#/VB.net but not in ASP. HOW? VALIDATION
-
Can a code work in the Textbox Keypress event. I want action perfomed when a key is pressed in a text box. It worked in C#/VB.net but not in ASP. HOW? VALIDATION
Web applications are little different because you have server-side and client-side processing. Getting the page to validate on the fly can be done by AutoPostBack but this can get resource consuming for every keystroke. These types of changes are better fielded by the browser using Javascript- http://w3schools.com/jsref/jsref_onchange.asp[^] The onChange event can be used to enact form validation. If you really need some VB or C# in play here, you might try to enact some AJAX with the onChange event. Good luck.
Ranjit Viswakumar Professional Services Specialist http://hostmysite.com/?utm\_source=bb