在保存的click的事件下, 1.取得TextBox框的数据! 例如:取姓名,密码等: string name = ((TextBox)FormView1.FindControl("nameTextBox")).Text; string password = ((TextBox)FormView1.FindControl("password TextBox")).Text; ................ 2.string sqlStr="Update Table set name ='"+name +"',password ='"+password +"',... where id ="+id;
1.取得TextBox框的数据!
例如:取姓名,密码等:
string name = ((TextBox)FormView1.FindControl("nameTextBox")).Text;
string password = ((TextBox)FormView1.FindControl("password TextBox")).Text;
................
2.string sqlStr="Update Table set name ='"+name +"',password ='"+password +"',... where id ="+id;
将Gridview某行数据(比如你点击某行触发事件)填充到下面的textbox中,然后修改提交。