Enter and the Button Click Event


 

Of particular interest to ASP.NET developers, though, is that when creating an ASP.NET Web Form hitting Enter to submit the form seemingly sometimes causes the page’s Button Web control’s Click event to fire, and other times not. In this short article we’ll see under what conditions a Button Web control’s Click event might not fire when the user submits the page hitting Enter; furthermore, we’ll look at a workaround. Read on to learn more!

Via ASP.NET.4GuysFromRolla.com: Enter and the Button Click Event

 

p.s. For additional information about Enter and form submission, as well as JavaScript techniques for disabling submissions via Enter and ensuring submissions via Enter (for older browsers), be sure to check out the following articles:

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s