How to get checkbox value in gridview

tibassowlbads

New Member
Can you please help me on this, I get the check box control value as false always even when I check the control in gridview. \[code\]for (int i = 0; i < GridView1.Rows.Count; i++){ CheckBox CheckBox1 = (CheckBox)GridView1.Rows.FindControl("CheckBox1"); if (CheckBox1 != null) { if (CheckBox1.Checked) { query = GridView1.Rows.FindControl("Label1") + ","; } }}\[/code\]
 
Back
Top