title: Postback after clicking a button does not react not for the first time in a UserControl
body: <p>I've a webapplication with UserControls. When I click on a menu-item or a select-button in a grid, than I see that didn't react the first time. When I clicked for the second time then an event behind the button will fire.</p>
  
  <p>What do I wrong? 
  I've given the components a unique ID and the events are in the cs-files.</p>
  
  <p>I hope someone can help me.</p>
  
  <p>thanks.</p>
  
  <hr>
  
  <p>The problems is in the two following examples:</p>
  
  <pre><code> &lt;asp:Menu ID="TabMenu" Width="100%" Height="25px" runat="server"         
                      Orientation="Horizontal" CssClass="TabPages" 
                      StaticEnableDefaultPopOutImage="False" 
                       AutoPostBack="true"  
                       OnMenuItemClick="DoMenuItemClick" &gt; 
                  &lt;Items&gt; 
                      &lt;asp:MenuItem Text="Domains" Value="0"&gt;&lt;/asp:MenuItem&gt; 
  </code></pre>
  
  <p>In this case for the first time, when you clicked on a menu-item, it looks like the page only is reloaded. And when clicks for the second time, the event really fires. In this example when you clicks on a menu-item, the right View is shown.</p>
  
  <pre><code> &lt;asp:GridView ID="gvwSelection" runat="server" 
          AllowPaging="True" 
          SelectedIndex="1"                 
          AutoGenerateSelectButton="True"
          OnSelectedIndexChanged="gvwSelectie_SelectedIndexChanged"
          OnSelectedIndexChanging="gvwSelectie_SelectedIndexChanging" &gt;
          &lt;PagerStyle ForeColor="#00257e" HorizontalAlign="Right" 
              BackColor="#FFFFFF"&gt;&lt;/PagerStyle&gt;
  
      &lt;/asp:GridView&gt;
  </code></pre>
  
  <p>Example 2: The first time you click on a selection button, then the row you touched is not selected. And after the first time everything works correct.</p>
  
  <p>The ID's have a fixed name.
  The AutoPostBack is set to True.
  There is an event linked.
  The grids has DataBinded.
  There is site.master a default.aspx and the UserControls are placed in a Placeholder.</p>
  
  <p>I hope someone can help me.</p>