How to stop IsPostBack from a textbox carriage return?

thearticles

New Member
I want to stop the IsPostBack fired from the enter key pressed at a TextBox. The textBox can not be multiline. I'm trying this:\[code\]<asp:TextBox ID="kemetTextBox" runat="server" Width="215px"> </asp:TextBox> <script type="text/javascript"> $(document).ready(function () { $("#kemetTextBox").keyup(function (e) { if (e.keyCode == 13) { Search(); return false; } }); }); </script>\[/code\]But it stills reloading the page.Data: Visual Studio 2010, Asp.net, C# as codebehind.Thanks
 
Back
Top