title: ASP.NET Button Inside Repeater Inside UpdatePanel Won't Fire!
body: <p>ASP.NET 3.5 SP 1 / Visual Studio 2008 V 9.x RTM</p>
  
  <p>I am trying to get a button inside a repeater inside an updatepanel to fire. 
  I't won't. I have tried adding a trigger outside the ContentTemplate and inside
  the UpdatePanel to no avail: </p>
  
  <pre><code> &lt;Triggers&gt;  
          &lt;asp:AsyncPostBackTrigger ControlID="BtnAddStatus" EventName="Click" /&gt;  
      &lt;/Triggers&gt; 
  </code></pre>
  
  <p>In fact, the AsyncPostBackTrigger's ControlID is always red and tells me "Cannot Resolve Symbol". This seems to be the case no matter where on the page I put the trigger. </p>
  
  <p>I have read posts that have solved this problem by putting the button outside 
  of the UpdatePanel but then, graphically speaking, the button will not be in the 
  correct spot. It needs to be DIV with the ID of btnDiv. </p>
  
  <p>So... how do I get the below button to fire? </p>
  
  <pre><code>&lt;asp:Button ID="BtnAddStatus" CssClass="small button Detail" Text="Share" runat="server" /&gt;
  </code></pre>
  
  <p>ASPX code as follows:</p>
  
  <pre><code>&lt;asp:Content ContentPlaceHolderID="ContentCenter" runat="server"&gt;
      &lt;asp:UpdatePanel ID="UpdatePanel1"  UpdateMode="Always" runat="server"&gt;
          &lt;ContentTemplate&gt;
              &lt;asp:Label ID="lblMessage" runat="server"&gt;&lt;/asp:Label&gt;
              &lt;asp:Repeater ID="repFilter" runat="server" 
                  onitemcommand="RepFilterItemCommand"&gt;
                  &lt;HeaderTemplate&gt;
                      &lt;div class="UIComposer_Box"&gt;
                          &lt;span class="w"&gt;
                              &lt;asp:TextBox class="input" ID="txtStatusUpdate" TextMode="MultiLine" Columns="60"
                                  name="txtStatusUpdate" Style="overflow: hidden; height: 40px; color: rgb(51, 51, 51);"
                                  runat="server"&gt;&lt;/asp:TextBox&gt;
                          &lt;/span&gt;
                          &lt;br clear="all"&gt;
                          &lt;div id="btnDiv" style="padding: 10px 5px; height: 30px;" align="left"&gt;
                              &lt;span style="float: left;"&gt;&amp;nbsp;PHP, Codeigniter, JQuery, AJAX Programming + 
                              Tutorials ( &lt;a href="http://www.x.info" target="_blank" style="color: rgb(236, 9, 43);"&gt;
                                      www.x.info&lt;/a&gt; )&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;/span&gt;
                              &lt;asp:Button ID="BtnAddStatus" CssClass="small button Detail" Text="Share" runat="server" /&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/HeaderTemplate&gt;
                  &lt;ItemTemplate&gt;
                      &lt;asp:Label ID="Label1" Text='&lt;%# ((Alert)Container.DataItem).Message  %&gt;' runat="server"&gt;&lt;/asp:Label&gt;
                  &lt;/ItemTemplate&gt;
                  &lt;FooterTemplate&gt;
                      &lt;br class="clear" /&gt;
                  &lt;/FooterTemplate&gt;
              &lt;/asp:Repeater&gt;
          &lt;/ContentTemplate&gt;
      &lt;/asp:UpdatePanel&gt;
  &lt;/asp:Content&gt;
  </code></pre>
  
  <p>AND MY PAGE LOAD CODE:</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
          {
              _presenter = new DefaultPresenter();
              _presenter.Init(this);
          }
  </code></pre>
  
  <p>AND THE BtnStatusClick Method:</p>
  
  <pre><code>protected void BtnAddStatusClick(object sender, EventArgs e)
          {
              if (!Page.IsPostBack)
              {
                  var su = new StatusUpdate
                               {
                                   CreateDate = DateTime.Now,
                                   AccountId = _userSession.CurrentUser.AccountId,
                                   Status = "" //txtStatusUpdate.Text
                               };
  
                  _statusRepository.SaveStatusUpdate(su);
                  _alertService.AddStatusUpdateAlert(su);
  
                  _presenter = new DefaultPresenter();
                  _presenter.Init(this);
  
  
              }
  
          }
  </code></pre>
  
  <p>Thanks again.</p>