title: OnClick events not working in ASP.NET page
body: <p>I am having a aspx page which inherits from a master page.
  In the master page I have a button that is common for every page in the solution.</p>
  
  <pre><code>&lt;div class="btn_general_mid"&gt;
  &lt;asp:Button 
      ID="btnMainSearch" 
      ValidationGroup="MainSearch" 
      OnClientClick="CheckSearchTextBox()"
      CausesValidation="true" 
      runat="server" 
      OnClick="btnMainSearch_Click"  
      CssClass="search_btn_submit"
      Text="Search" /&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Here the <code>CheckSearchTextBox()</code> is a javascript function and the <code>btnMainSearch_Click</code> is the event which is handling the code behind part of the button.</p>
  
  <p>In a certain page this button click event <code>btnMainSearch_Click</code> is not fired. (The debugger does not reach that in the code)</p>
  
  <p>In the runtime, (When examined using Firebug) this is the code segment generated for the button.</p>
  
  <pre><code>&lt;div class="btn_general_mid"&gt;
  &lt;input id="ctl00_btnMainSearch" 
  class="search_btn_submit" 
  type="submit"    
  onclick="CheckSearchTextBox();WebForm_DoPostBackWithOptions(new  WebForm_PostBackOptions("ctl00$btnMainSearch", "", true, "MainSearch", "", false, false))" 
  value="Search" 
  name="ctl00$btnMainSearch"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Actually in the other pages where this button works fine , the same html output is generated for this button. Am I missing something here?</p>