从代码隐藏文件中访问Repeater内部的Control

从代码隐藏文件中访问Repeater内部的Control

本文介绍了从代码隐藏文件中访问Repeater内部的Control的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我是asp.net的新手。如果可以,请帮忙。 是否可以引用一个控件(即标签,占位符,文本框) ,它位于代码隐藏文件中的转发器对象中?当我在转发器之外放置控制对象时,我可以从 代码后面的文件中引用它。当我将控制对象放在转发器内时, 我得到需要实例化控制对象的错误。如果我在控件后面的文件中声明控制对象,那么错误就会消失,但我无法引用控件对象组件。请帮忙。im new to asp.net. please help if u can.is it possible to refer to a control(ie lable, placeholder, textbox)that is inside a repeater object from a code behind file? when i placethe control object outside of the repeater, i can refer to it from thecode behind file. when i place the control object inside the repeater,i get a ''need to instanciate the control object'' error. if i declarethe control object inside the control behind file, the error goesaway, but i cant refer to the control objects components. please help.推荐答案 这篇关于从代码隐藏文件中访问Repeater内部的Control的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-14 05:13