loop through the gridview and see if the checkbox is checked then get the first column value using ASP .net
===

i want to loop through the gridview and see if the checkbox is checked then get the first column value using ASP .net gridview 

i'd try this but it does not work : 

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
    
            For i As Integer = 0 To DossierGV.Rows.Count - 1
                If DirectCast(DossierGV.Rows(i).Cells(0).FindControl("CheckBox1"), CheckBox).Checked = True Then
                    execSQL("update OFPPT_Envoyer set vue = '1' where ID_Dossier = " & (DossierGV.Rows(i).Cells(2).Text), "e")
                End If
            Next
        End Sub

and ths is the gridview :

     &nbsp;<asp:Button ID="Button1" runat="server" Text="Vue" />
               <asp:GridView ID="DossierGV" runat="server" AllowSorting="True" 
                   AutoGenerateColumns="False" DataKeyNames="ID_Dossier" 
                   DataSourceID="SqlDataSource1">
                   <Columns>
                    <asp:TemplateField HeaderText="Choisir">
                           <EditItemTemplate>
                               <asp:CheckBox ID="CheckBox1" runat="server" />
                           </EditItemTemplate>
                           <ItemTemplate>
                               <asp:CheckBox ID="CheckBox1" runat="server" />
                           </ItemTemplate>
                       </asp:TemplateField>
                       <asp:BoundField DataField="ID_Dossier" HeaderText="ID_Dossier" ReadOnly="True" 
                           SortExpression="ID_Dossier" />
                       <asp:BoundField DataField="I ....................
    ..............................