title: Onclient Click Event Fires when Enter Key Press on TextBox
body: <p>I have a Search TextBox on Master Page,and i want that user write its word and on pressing enter key it should start searching. So onkeypress event i call a function which takes a searching word and pass it to search page.here is my textbox.</p>
  
  <pre><code>&lt;asp:TextBox runat="server" ID="searcht" onkeypress='validateSId($(this),(event))'&gt;&lt;/asp:TextBox&gt;
  </code></pre>
  
  <p>This is my function.</p>
  
  <pre><code>function validateSId(txt, e) {
      if (e.keyCode == 13) {
          var str = txt.val();
          window.location = "search.aspx?data=" + str;
      }
  }
  </code></pre>
  
  <p>I have another page demo.aspx which inherits master page and it contain one submit button and java script validation function for text boxes which gets fire on On client Click event.here is button.</p>
  
  <pre><code> &lt;asp:Button ID="btnSubmit" runat="server" Text="Submit"
   OnClientClick="return DemoCheckFields()"OnClick="btnSubmit_Click" CssClass="btn-red-big btn-big" TabIndex="22" 
  </code></pre>
  
  <p>Now the Problem is when ever i press enter on search textbox,it first
  execute the DemoCheckFields function and then validateSId().
  I want that on pressing enter key from search textbox it should execute only validateSId().</p>