Click here to Skip to main content
15,892,517 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a web form that I would like for the Enter Button on any keyboard not to submit the form. Is there a clean way of doing this in c# or in ASP.NET?
Posted

http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.button.usesubmitbehavior(v=vs.110).aspx[^]

Set UseSubmitBehavior="False" on your Buttons. This disables the "AutoPostback" on Enter.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900