Submitting ASP.NET form with enter key (Actual Post from http://www.bloggidity.com/web/2004/01/18/submitting_asp_net_form_189.htm)

Published Thursday, March 24, 2005 11:47 AM

This has got to be the wierdest fix I've ever seen, but it works. I was completely puzzled as to why my search button would -not- work when I entered data and hit enter. It would just not do anything. Then I read this article on Matt Berther's blog:

For the last few hours, I've been trying to figure out why my event handler is not being hooked up when I hit the ENTER key to submit my ASP.NET form.

As it turns out, this is a bug with ASP.NET. If you're not aware of this, the work around is to insert an invisible *HTML* textbox (an asp:TextBox wont work).

Add this line somewhere on the page:

, and all will work as expected.

Read more here:

http://www.bloggidity.com/web/2004/01/18/submitting_asp_net_form_189.htm

 

(Actual Post from http://www.bloggidity.com/web/2004/01/18/submitting_asp_net_form_189.htm)

by riaan

Comments

# kalimurzino@rambler.ru said on Saturday, May 26, 2007 4:33 PM

Gonsalez music

Leave a Comment

(required) 
(required) 
(optional)
(required) 

Enter the numbers above: