title: CheckBox in ASP.NET GridView template field does not retain it's value on submit
body: <p>I'm trying to use CheckBoxes within a GridView's TemplateField to select multiple entries from that GridView. The GridView's data source is a list of items that is generated at page load.</p>
  
  <pre><code>&lt;asp:GridView ID="GridView" runat="server" AutoGenerateColumns="False" 
              AllowPaging="True" onpageindexchanging="TANsGridView_PageIndexChanging" 
              DataKeyNames="GUID"&gt;
              &lt;Columns&gt;
                  &lt;asp:TemplateField ShowHeader="False" HeaderText="Checker"&gt;
                      &lt;ItemTemplate&gt;
                          &lt;asp:CheckBox ID="SelectCheckbox" runat="server" /&gt;
                      &lt;/ItemTemplate&gt;
                  &lt;/asp:TemplateField&gt;
  </code></pre>
  
  <p>The problem is that when I press a submit button, all the CheckBoxes are returned with the Checked property as 'false'.</p>
  
  <p>For cycling through the rows, I use:</p>
  
  <pre><code>foreach (GridViewRow row in TANsGridView.Rows)
          {
              CheckBox cb = (CheckBox)row.FindControl("SelectCheckbox");
          }
  </code></pre>
  
  <p>What should I use in order to have access to the correct value?</p>
  
  <p>Thanks, Catalin</p>