ASP.NET Making a button submit on press of the Enter key#
Man this is dumb.

In order to make a button work like a form submit button you need to add the following line of code to the page load event

RegisterHiddenField("__EVENTTARGET", Me.cmdButton.ClientID)

Where cmdButton is the ID of the button.
Categories:  |  | 
Thursday, August 21, 2003 12:54:50 PM (Central Standard Time, UTC-06:00) #    Comments [0]  |  Tracked by:
"Default Buttons in ASP.NET 2.0" (Chris May) [Trackback]

 

Name
E-mail
(will show your gravatar icon)
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):

All content © 2008, Christopher May, Inc
Open Job Positions
On this page
Google Ads
This site
Calendar
<November 2008>
SunMonTueWedThuFriSat
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456
Archives
Sitemap
Blogroll OPML
Disclaimer

Powered by: newtelligence dasBlog 1.9.6264.0

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Send mail to the author(s) E-mail

Theme design by Jelle Druyts


Pick a theme: