动态创建GridView问题 [英] dynamically create gridview problem

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

问题描述

当在其他事件上动态创建gridview时,如何查找按钮单击事件上的网格文本框值

how to find out grid textbox value on button click event while gridview is dynamically created on other event

推荐答案

使用"FindControl()"方法,您可以获取控件的引用


TextBox tb = GridView1.Rows [0] .Cells [0] .FindControl("contro_id");


字符串tbvalue = tb.Text;
using ''FindControl()'' method u can get the ref of control


TextBox tb=GridView1.Rows[0].Cells[0].FindControl("contro_id");


string tbvalue=tb.Text;


这篇关于动态创建GridView问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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