Wire up the default button

One line of code to wire up the default button on Enter key in ASP.net forms courtesy of Jeff Putz's blog.

 EmailTextBox.Attributes.Add("onKeyPress", "BLOCKED SCRIPTif (event.keyCode == 13) __doPostBack('" + LoginButton.UniqueID + "','')");

posted on Thursday, July 28, 2005 4:30 PM by AlanL

Comments