用row.Cells[2].Text:取出第三个单元格的值,注意单元格是从0开始算的
eg:
eg:
string emailStr = "";
foreach (GridViewRow row in gvUser.Rows)
{ ///找到CheckBox控件
CheckBox cbUser = (CheckBox)row.FindControl("cbUser");
if (cbUser == null) continue;
if (cbUser.Checked == true)
{
emailStr += row.Cells[2].Text +";";
}
}