foreach (GridViewRow row in GridView1.Rows) { if (row.Cells[1].Text.ToString() == "True" || row.Cells[1].Text.ToString() == "1") { rtag = rtag + "1"; } else { rtag = rtag + "0"; } }
foreach (GridViewRow row in GridView1.Rows) { bool isChecked = ((CheckBox) row.FindControl("YourCheckBoxID")).Checked; if (isChecked) { rtag = rtag +"1" } else { rtag = rtag + "0" } }
foreach (GridViewRow row in GridView1.Rows) { CheckBox chk = (CheckBox)row.FindControl("YourCheckBoxID"); if (chk.Checked) { //logic to implement when check box is checked } else { //logic to implement when check box is not checked } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)