因为在公司工作中碰到了问题,所以把这个当做笔记记录下来。
在GridView中 取Textbox中的值
for (int i = 0; i < this.gvUserInfo.Rows.Count; i++)
{
CheckBox cb = (gvUserInfo.Rows[i].FindControl("chkUser")) as CheckBox;
if (cb.Checked == true)
{
TextBox textbox = (gvUserInfo.Rows[i].FindControl("txt")) as TextBox;
//HtmlInputText txtReturnMacNo = (HtmlInputText)this.gvUserInfo.Rows[i].FindControl("Text1");//申述内容
ServOneManager.ModifySsNr(Convert.ToInt32(gvUserInfo.DataKeys[i].Value), textbox.Text.ToString());
}
}