asp.net gridview复选框始终为false

时间:2013-07-10 13:16:25

标签: javascript asp.net

我在GridView中有一个CheckBox。当我点击保存按钮Checkbox.checked时,属性始终为false。

这是我的代码:

ArrayList productsToDelete = new ArrayList();

foreach (GridViewRow row in GridViewSubmit.Rows)
{

    CheckBox chkDelete = (CheckBox)GridViewSubmit.Rows[row.RowIndex].FindControl("chkDelete");
    if (chkDelete != null)
    {
       if (chkDelete.Checked)
       {

       }
    }
}

0 个答案:

没有答案