Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim i As Integer = 0
    For i = 0 To GridView1.Rows.Count - 1
        If CType(GridView1.Rows(i).Cells(0).FindControl("CheckBox1"), CheckBox).Checked = True Then
            Response.Write(GridView1.Rows(i).DataItemIndex)
        End If
    Next
End Sub

goodlucky 發表在 痞客邦 PIXNET 留言(0) 人氣()