As you may already know, when the Enter key is pressed within an ASP.NET Web Form that has multiple single-line textboxes, the form will submit and the Button Web control that appears first in the HTML page's markup will have its Click event fired.
For eg, I set focus on a textbox and press "Enter", the form submit automatically and the first Button Web Control is clicked.
How can I prevent this behaviour??
I do NOT want the first Button's click event being triggered.
Edit:
I do NOT want to disable Enter keyPress on the Form.
I just want to prevent this odd behaviour.(at least odd and unnecessary to me).
If I set focus on the textbox and press enter, why was the first button's click button triggered??