前台gridview
 <asp:GridView ID="gv_SalesPlan" runat="server" AllowPaging="True" 
                                    AutoGenerateColumns="False" EmptyDataText="没有相关数据" EnableModelValidation="True" 
                                    Width="100%" onrowdatabound="gv_SalesPlan_RowDataBound" 
                                    onrowcommand="gv_SalesPlan_RowCommand" >
                                    <Columns>
                                        <asp:TemplateField HeaderText="序号">
                                            <itemtemplate>
                                   <%#Container.DataItemIndex+1 %>                
                                            </itemtemplate>
                                            <ItemStyle HorizontalAlign="Center" />
                                        </asp:TemplateField>
                                         <asp:TemplateField HeaderText="全选" >
                                <HeaderTemplate>
                                    <asp:CheckBox ID="CheckBox2" runat="server" AutoPostBack="True" OnCheckedChanged="CheckBox1_CheckedChanged"
                                        Text="全选" />
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox ID="CheckBox1" runat="server"  />
                                </ItemTemplate>
                            </asp:TemplateField>在表头我放了个全选的checkbox,想在后台调用这个box,但是娶不到值,怎么取呢,求大虾了。试过CheckBox ck = (CheckBox)e.Row.FindControl("CheckBox2"); ck为null;
CheckBox ck = (CheckBox)e.Row.FindControl("CheckBox2");
CheckBox ck = (CheckBox)e.Row.TemplateControl .FindControl("CheckBox2");都不行