protected void Button1_Click(object sender, EventArgs e) { for (int i = 0; i < GridView1.Rows.Count;i++ ) { CheckBox chk = (CheckBox)GridView1.Rows[i].FindControl("CheckBox1") as CheckBox; } }
foreach(GridViewRow row in GridView1.Rows) { CheckBox chk = (CheckBox)row.FindControl("CheckBox1"); if(chk.Checked) { // code here } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)