如何在gridveiw中检索动态创建的文本框的值 [英] how to retrieve value of dynamically created textbox in gridveiw

查看:109
本文介绍了如何在gridveiw中检索动态创建的文本框的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在更新gridview数据..........我在edititemtemplate中有文本框。现在我必须更新gridview中的值。我将如何从文本框中检索值并在数据库中更新它。请帮助我

I am updating gridview data ..........i have textbox in edititemtemplate. Now i have to update the value in gridview. how will i retrieve the value from textbox and update it in database ..Please help me

推荐答案

使用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.


这篇关于如何在gridveiw中检索动态创建的文本框的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆