且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在gridveiw中检索动态创建的文本框的值

更新时间:2023-10-02 17:22:58

使用RowUpdating事件。

你可以找到你的文本框控件使用

Use RowUpdating event.
and you can find your textbox control using
TextBox txtName = (TextBox)Gridview1.Rows[e.RowIndex].FindControl("txtName");
string Name=txtname.Text;





使用此名称更新数据库。



Use this Name to update database.