ASP:CheckBox获取前台的checked的属性

后台代码:

for (int i = 0; i < this.GvCourses.Rows.Count; i++)
{
    CheckBox chb = this.GvCourses.Rows[i].FindControl("CheckB") as CheckBox;
    if (chb.Checked)
    {
        strDelete += "," + this.GvCourses.Rows[i].Cells[0].Text;
    }
}

前台代码:

<asp:CheckBox runat="server" ID="CheckB" />
原文地址:https://www.cnblogs.com/lanke0/p/5720269.html