for (int i = 0; i <= gvData.Rows.Count - 1; i++)
{
CheckBox cbox = (CheckBox)GridView1.Rows[i].FindControl("CheckBox1");
if (cbox.Checked == true)
{
...
}
}为什么选中了CheckBox,但是cbox.Checked值总是false? 也就是...处的代码始终不执行。
{
CheckBox cbox = (CheckBox)GridView1.Rows[i].FindControl("CheckBox1");
if (cbox.Checked == true)
{
...
}
}为什么选中了CheckBox,但是cbox.Checked值总是false? 也就是...处的代码始终不执行。
{
CheckBox cbox = (CheckBox)GridView1.Rows[i].FindControl("CheckBox1");
if (cbox.Checked == true)
{
...
}
}把 i=0改成i=1试试
中多了个" ","CheckBox1"