在asp.net中访问动态创建的texbox值 [英] Accessing dynamically created texbox value in asp.net

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

问题描述

我在其中创建一个表我创建了三个文本框,它们通过循环具有不同的id但是当我访问任何文本框的值时,它生成异常,即对象空引用。当我检查断点时,文本框的对象为空。一旦该表被添加到旁边占位符。

I am creating a table inside it i create three textbox which have different id through looping but when i accessing value of any textbox it generate exception that is object null reference. when i check through break point the textbox''s object is null. Once thing that table is add in side placeholder.

推荐答案

您好,



它将帮助您:

http://msdn.microsoft.com/en-us/library/ ms972948.aspx [ ^ ]

http: //social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/ce517c65-8dae-4a29-9522-6297be2e6fb7/ [ ^ ]

< a href =http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/GridViewEx11.asp> http://msdn.microsoft.com/library/ default.asp?url = / library / en-us / dnaspp / html / GridViewEx11.asp [ ^ ]
Hi,

It will help you :
http://msdn.microsoft.com/en-us/library/ms972948.aspx[^]
http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/ce517c65-8dae-4a29-9522-6297be2e6fb7/[^]
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/GridViewEx11.asp[^]


如果你想访问运行时声明点击事件或者它应该在页面init事件上创建的任何属性,因为它在页面加载事件之前触发,因此可以在页面的任何地方访问它并找到它通过对象发送者(变量)控制..
if you want to access runtime declare click event or any property it should be created on page init event because it fire before page load event so it is accessible anywhere on the page and find this control through object sender(variable)..


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

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