HOW TO: Use the Enter Key in a TextBox Control to Submit a Form
Solution
-
Using the enter key
to submit a form (AllAsp.net) - achieved by setting the value of the __EVENTTARGET
hidden form field; also showcases a solution which adds Javascript code to a TextBox
control to intercept the client-side enter keypress event.
-
Default
Button.Net by Janus Kamp Hansen - adds Javascript code (similar to the above).
-
DefaultButtons
Control (MetaBuilders) - a custom control solution.
Related Resources