title: Getting repeater item checkbox values when calling command from footer
body: <p>Have following repeater control with a list of checkboxes:</p>
  
  <pre><code>&lt;asp:Repeater ID="rptItemList" runat="server"&gt;
  &lt;HeaderTemplate&gt;
  &lt;/HeaderTemplate&gt;
  &lt;ItemTemplate&gt;
      &lt;div&gt;
          &lt;asp:CheckBox ID="chkItem" runat="server" Text='&lt;%# DataBinder.Eval(Container.DataItem, "ItemName").ToString() %&gt;' /&gt;
          &lt;asp:HiddenField ID="hdItem" runat="server" Value='&lt;%# DataBinder.Eval(Container.DataItem, "ItemId").ToString() %&gt;' /&gt;
      &lt;/div&gt;
  &lt;/ItemTemplate&gt;
  &lt;FooterTemplate&gt;
      &lt;asp:LinkButton ID="lbtnDel" runat="server" Text="Delete" OnClick="lbtnDel_Click" OnClientClick="return confirm('Are you sure you want to delete selected items from this list?')"&gt;&lt;/asp:LinkButton&gt;
  &lt;/FooterTemplate&gt;
  &lt;/asp:Repeater&gt;
  </code></pre>
  
  <p>and following back code to handle the lbtnDel_Click event:</p>
  
  <pre><code>    protected void lbtnDel_Click(object sender, EventArgs e)
      {
          foreach (RepeaterItem ri in rptItemList.Items)
          {
              CheckBox chk = (CheckBox)ri.FindControl("chkItem");
              HiddenField hd = (HiddenField)ri.FindControl("hdItem");
  
              if (chk.Checked)
              {
                  var tc = new ItemController();
                  tc.DeleteItem(Convert.ToInt32(hd.Value));
              }
          }
          Response.Redirect(DotNetNuke.Common.Globals.NavigateURL());
      }
  </code></pre>
  
  <p>When I select a checkbox and click delete, the code finds the checkbox but reads it as unchecked so doesn't delete the item.</p>
  
  <p>Any ideas?</p>