Possible Duplicate:
ASP.NET Canceling the Default Submit Button
I have only 1 button in my ASP.NET page but when I click "Enter" key the button click function is talking place. I don't want that. Only manual click must work. How to make this?
Possible Duplicate:
ASP.NET Canceling the Default Submit Button
I have only 1 button in my ASP.NET page but when I click "Enter" key the button click function is talking place. I don't want that. Only manual click must work. How to make this?
Set the button's UseSubmitBehavior = "false"
<body onkeypress="return CancelReturnKey();">
<script type="text/javascript">
function CancelReturnKey() {
if (window.event.keyCode == 13)
return false;
}
</script>
Please see the links
http://www.bloggingdeveloper.com/post/Disable-Form-Submit-on-Enter-Key-Press.aspx