1
我有一個GridView綁定字段和複選框的模板字段。我按照檢查複選框編寫了刪除記錄的代碼。我的問題是GridView中的Asp.net CheckBox失去其價值
HtmlInputCheckBox chk;
foreach(GridViewRow dr in dgvdetails.Rows)
{
chk = (HtmlInputCheckBox)dr.FindControl("ch");
chk.Checked = true;
if (chk.Checked)/// **here checkbox is not checked even if I'm check it**
{
pl.id = int.Parse(chk.Value);
bl.deletedgvdetails(pl);
}
}