title: ASCX page Button click not firing server side
body: <p>I have a Master page which is inherited in a aspx page named Employee. Below is the relevant code of the aspx page</p>
  
  <pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Employee.aspx.cs" Inherits="ICA_Nagerbajar.Employee" MasterPageFile="~/Master.Master" %&gt;
  &lt;%@ Register TagPrefix="e" TagName="Entry" Src="~/EmployeeView/EmployeeEntry.ascx" %&gt;
  &lt;%@ Register TagPrefix="v" TagName="ViewEdit" Src="~/EmployeeView/EmployeeViewEdit.ascx" %&gt;
  &lt;asp:Content ID="ContentBody" ContentPlaceHolderID="MasterBodyPlaceHolder" runat="server"&gt;
  
      &lt;div class="tabbable"&gt;
          &lt;ul class="tabs"&gt;
              &lt;li&gt;&lt;a href="#tab1"&gt;Entry&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#tab2"&gt;View/Edit&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
          &lt;div class="tabcontent"&gt;
              &lt;asp:HiddenField ID="TabData" runat="server" /&gt;
              &lt;div id="tab1" class="tab" style="display:inline-block"&gt;
                  &lt;e:Entry ID="EmpEntry" runat="server" /&gt;
              &lt;/div&gt;
  
              &lt;div id="tab2" class="tab" style="display:inline-block"&gt;
                  &lt;v:ViewEdit ID="EmpViewEdit" runat="server" /&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
  &lt;/asp:Content&gt;
  </code></pre>
  
  <p>Now in one of the ascx page (EmployeeEntry.ascx) Button is working fine. But in the other one(EmployeeViewEdit.ascx) it is not working. Below is the relevant code of EmployeeViewEdit.ascx </p>
  
  <pre><code>&lt;%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EmployeeViewEdit.ascx.cs" Inherits="ICA_Nagerbajar.EmployeeView.EmployeeViewEdit" %&gt;
  &lt;div class="boxed"&gt;
     &lt;input id="TextBoxUserNameSearch" runat="server" class="textstyle" placeholder="Name" type="text"/&gt;
     &lt;asp:Button ID="ButtonSearch" runat="server" Text="Search" class="btnsubmitstyle" OnClick="ButtonSearch_Click"/&gt;
  &lt;/div&gt;  
  
  Server Side Code
  
    #region Search Button Click
          protected void ButtonSearch_Click(object sender, EventArgs e)
          {
              string userName = TextBoxUserNameSearch.Value.Trim();
              GetEmployee(userName + "%");
          }
    #endregion
  </code></pre>
  
  <p><strong>Few Observations i made</strong></p>
  
  <ol>
  <li><p>If i replace Button with Link Button its working fine</p></li>
  <li><p>No Button is working in this ascx though its working in the other ascx</p></li>
  <li><p>If i comment out the first call to ascx in the parent page then the button is working ie, <code>&lt;e:Entry ID="EmpEntry" runat="server" /&gt;</code></p></li>
  </ol>