title: Button in a Repeater does not fire ItemCommand
body: <p>Why would a button inside a Repeater not fire the Repeater's ItemCommand event? Is there a way to force it to do so? ViewState is Enabled.</p>
  
  <p>In the code below, btnApprove and btnDelete are the buttons in question:</p>
  
  <pre><code>&lt;asp:Repeater runat="server" ID="rpt1" onitemdatabound="rpt1_ItemDataBound" onitemcommand="rpt1_ItemCommand" &gt;
      &lt;ItemTemplate&gt;
          &lt;table width="100%" style="margin-bottom:6px;"&gt;
              &lt;tr&gt;
                  &lt;td&gt;
                      &lt;asp:CheckBox ID="chkSelected" runat="server" Text=" " TextAlign="Right"/&gt; Select
                      &lt;asp:Button ID="btnApprove" runat="server" Width="80px" Text="Approve" /&gt;
                      &lt;asp:Button ID="btnDelete" runat="server" Width="80px" Text="Delete" /&gt;
                  &lt;/td&gt;                                                                   
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td align="right"&gt;
                      &lt;asp:Label ID="lblCommentStatus" runat="server" Text="Label"&gt;&lt;/asp:Label&gt;
                  &lt;/td&gt;
              &lt;/tr&gt;
          &lt;/table&gt;
          &lt;table width="100%" style="margin-top:6px;"&gt;
              &lt;tr&gt;
                  &lt;td&gt;&lt;asp:Label ID="lblAuthorName" runat="server" Text="Author: " Width="60px"&gt;&lt;/asp:Label&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;asp:TextBox ID="txtAuthorName" runat="server" Width="250px"&gt;&lt;/asp:TextBox&gt;&lt;/td&gt;
                  &lt;td style="padding-left: 30px;"&gt;&lt;asp:Label ID="lblAuthorLocation" runat="server" Text="Location: " Width="70px"&gt;&lt;/asp:Label&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;asp:TextBox ID="txtAuthorLocation" runat="server" Width="250px"&gt;&lt;/asp:TextBox&gt;&lt;/td&gt;
              &lt;/tr&gt;
          &lt;/table&gt;
          Title: &lt;asp:TextBox ID="txtTitle" runat="server" Width="640px" Enabled="False"&gt;&lt;/asp:TextBox&gt;
          Body: &lt;asp:TextBox ID="txtBody" runat="server" Width="640px" TextMode="MultiLine" Height="60px" Enabled="False"&gt;&lt;/asp:TextBox&gt;
          &lt;table width="100%" style="margin-top:6px;"&gt;
              &lt;tr&gt;
                  &lt;td&gt;&lt;asp:Label ID="lblVotes" runat="server" Text="Votes: " Width="80px"&gt;&lt;/asp:Label&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;asp:Label ID="lblVotesCount" runat="server" Text="" Width="600px"&gt;&lt;/asp:Label&gt;&lt;/td&gt;
              &lt;/tr&gt;
          &lt;/table&gt;
          &lt;hr style="margin-top:20px; margin-bottom:20px;" /&gt;
      &lt;/ItemTemplate&gt;
  &lt;/asp:Repeater&gt;
  
  /// &lt;summary&gt;
    /// Handles the ItemCommand event of the rpt1 control.
    /// &lt;/summary&gt;
    /// &lt;param name="source"&gt;The source of the event.&lt;/param&gt;
    /// &lt;param name="e"&gt;The &lt;see cref="System.Web.UI.WebControls.RepeaterCommandEventArgs"/&gt; instance containing the event data.&lt;/param&gt;
    protected void rpt1_ItemCommand(object source, RepeaterCommandEventArgs e)
    {
      var c1 = CommentRepository.GetById(Convert.ToUInt64(e.CommandArgument.ToString()));
  
      if (e.CommandName == "approve")
      {
        c1.Approved = true;
        c1.ApprovationUserId = WebAdminContext.RelatedUserId;
      }
  
      if (e.CommandName == "reject")
      {
        c1.Approved = false;
        c1.ApprovationUserId = 0;
      }
  
      if (e.CommandName == "delete")
      {
        c1.Deleted = true;
        c1.DeletionUserId = WebAdminContext.RelatedUserId;
      }
  
      if (e.CommandName == "restore")
      {
        c1.Deleted = false;
        c1.DeletionUserId = 0;
      }
  
      CommentRepository.Update(c1);
  
      ResetSubSequenceInfo();
      BindList();
        }
  
  /// &lt;summary&gt;
    /// Binds the list.
    /// &lt;/summary&gt;
    private void BindList()
    {
      _Criteria = lcb1.GenerateCriteriaFromUI();
  
      var sc1 = CommentRepository.Filter(
        new FilteringOptions(
          EntityListPager1.CurrentSubSequenceInfo,
          null,
          CommentRepository.GetCriteriaToFilterByTGID(CurrentEntityGEODEReference.GID).And(_Criteria)
          )
        );
  
      // BIND
      rpt1.DataSource = sc1.Items;
      rpt1.DataBind();
  
      EntityListPager1.BindToUI(sc1.Info);
    }
  </code></pre>