Monday, February 8, 2010

Asp.net login control on enter key down to login?

how to make the login control to do the login action when key down (enter) in password or login textbox occurs, i saw that the textbox doesn't have a onKeyDown event :SAsp.net login control on enter key down to login?
Hi dude,





In visual studio in source view mode select your form by selecting something like %26lt;form runat=';server';%26gt; , after that in Properties Window (ALT + ENTER) set the value of DefaultButton to your login button's name. It would help.





good luck...Asp.net login control on enter key down to login?
The textbox can use an onkeydownevent; however this is handled by javascript. You would not want asp.net to have an onkeydownevent because it would repost the page everytime a user pressed a key.





You can learn about the onkeydownevent with javascript here:


http://www.w3schools.com/jsref/jsref_onk鈥?/a>





If you have further question, then don't hesitate to email me: irishtek@yahoo.com

No comments:

Post a Comment