title: Stop Enter key from firing button click event
body: <p>I am hoping this is easy, but I have looked and can't find a solution that will work for me. I have an aspx page with 2 user controls on it. One is a user control with a spun-up Auto Complete text box, that I want the "Enter" key to to cause a postback. </p>
  
  <p>I have a button in the other control on the page that the onClick does something else. When I put text in the Auto Complete and press enter, the onClick for the button fires. Is there a way to have the enter key not cause the onClick to fire. </p>
  
  <p>I have tried some javascript to disable the enter key press, but that breaks my text box enter.</p>
  
  <p>What are my options.</p>
  
  <p><strong>EDIT 1</strong></p>
  
  <p>Here is some markup that I have</p>
  
  <pre><code>&lt;uc:CompanyAC runat="server" ID="ac" /&gt;
  &lt;cc2:GenericGridView OnHtmlDataCellPrepared="HtmlDataCellPrepared"
  KeyFieldName="CompanyID" ID="gridCompanies" DataSourceID="ManageCompaniesObjectDataSource" runat="server" 
  AutoGenerateColumns="False" /&gt;
  </code></pre>
  
  <p>The CompanyAC control has a textbox with some jquery that does autocomplete WS call (no need to show that</p>
  
  <pre><code>&lt;asp:TextBox ID="searchbox" runat="server" Width="400px" /&gt;
  </code></pre>
  
  <p>The GenericGridView control contains a button</p>
  
  <pre><code>&lt;asp:Button runat="server" ID="Button" Text="New" AllowFocus="false" OnClick="Button_Click" /&gt;
  </code></pre>
  
  <p>So what happens is that when the Enter Key is hit when the focus is on the Textbox, the button that is in the other control fires its onclick. I do not want that to happen, but I still want the postback to happen</p>