Enter Key Press Postback on Login Page

0 views
Skip to first unread message

surind...@gmail.com

unread,
May 3, 2006, 1:32:15 AM5/3/06
to ASPNETCodeSnippets
Add textbox and a button on the page and copy past this code in code
behind on page load event.

TextBox1.Attributes.Add("onkeydown", "if(event.which ||
event.keyCode){if ((event.which == 13) || (event.keyCode == 13))
{document.getElementById('"+Button1.UniqueID+"').click();return
false;}} else {return true}; ");

Reply all
Reply to author
Forward
0 new messages