Avoid ENTER in ASP TextBox (Javascript)

In order to avoid ENTER key in your asp:TextBox you’ve to add onkeydown event and control it, like this:

<asp:TextBox ID="myTextBox" runat="server"
onkeydown="return (event.keyCode != 13);"></asp:TextBox>

Categories:

No Responses

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.