Go homepage(回首页)
Upload pictures (上传图片)
Write articles (发文字帖)

The author:(作者)归海一刀
published in(发表于) 2014/1/30 1:27:53
GridView中添加CheckBox并返回选中行_[Asp.Net教程]

GridView中添加CheckBox并返回选中行_[Asp.Net教程]
一:添加CheckBox






















二:查看哪一行的CheckBox被选中
foreach(GridViewRow row in this.StudentGridView.Rows)
{
Control ctrl = row.FindControl("CheckBox");
if ((ctrl as CheckBox).Checked)
{
TableCellCollection cell = row.Cells;
string studentCode = cell[1].Text;
}
}


If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)





QQ:154298438
QQ:417480759