62,046
社区成员
发帖
与我相关
我的任务
分享
protected void Button1_Click(object sender, EventArgs e)
{
List<string> listID=new List<string>
foreach (GridViewRow row in this.GridView1.Rows)
{
CheckBox CheckRow = (CheckBox)row.FindControl("CheckBox1");
if (CheckRow.Checked)
{
//string id = this.GridView1.DataKeys[row.RowIndex].Values
//["id"].ToString();
listID.Add(this.GridView1.DataKeys[row.RowIndex].Values["id"].ToString());
//Response.Write(id.ToString());
}
}
}