title: How to prevent redirection to another aspx page on pressing enter key on textbox?
body: <p>I am having one user control which contains search functionality and when i load this user control by default i am setting focus to this search <code>textbox</code>:</p>
  
  <pre><code> &lt;asp:TextBox ID="txtSearch" runat="server"&gt;&lt;/asp:TextBox&gt;
     &lt;asp:ImageButton ID="btnSearch" runat="server" ToolTip="Search" OnClick="btnSearch_Click" /&gt;
  </code></pre>
  
  <p>Now when i press enter key on textbox then control goes on my master page load event and that master page load event contains one method which redirects to respective url.</p>
  
  <p>But this happens only on enter and control goes to master page load events and i want to stop this.</p>
  
  <p>So how to prevent this??</p>