keeping GridView checkbox state when posting back
<p>I have a GridView which with a CheckBox in a TemplateField. </p>

<p>When I check something and hit the submit button, the items that I have checked are not check on the postback. </p>

<p>I tried using <code>EnableViewState</code> and that did not help. </p>

<p>How can this be fixed?</p>

<pre><code>    &lt;asp:Button ID="btnSubmit" runat="server" Text="Submit" /&gt;

    &lt;asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"&gt;
        &lt;Columns&gt;               
             &lt;asp:TemplateField HeaderText="SELECT"&gt;
                &lt;ItemTemplate&gt;
                   &lt;asp:CheckBox ID="CheckBox1" runat="server"/&gt;
                &lt;/ItemTemplate&gt;
            &lt;/asp:TemplateField&gt;
            &lt;asp:BoundField DataField="ICAO" HeaderText="ICAO" /&gt;
            &lt;asp:BoundField DataField="IATA" HeaderText="IATA" /&gt;
            &lt;asp:BoundField DataField="AIRPORT_NAME" HeaderText="AIRPORT NAME" /&gt;
            &lt;asp:BoundField DataField="CITY" HeaderText="CITY" /&gt;
            &lt;asp:BoundField DataField="COUNTRY" HeaderText="COUNTRY" /&gt;
            &lt;asp:BoundField DataField="REVISED_DATE" HeaderText="REVISED DATE" /&gt;
            &lt;asp:BoundField DataField="EMAIL_DATE" HeaderText="EMAIL DATE" /&gt;          
        &lt;/Columns&gt;            
    &lt;/asp:GridView&gt;
</code></pre>
