专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > ASP.NET

在PlaceHolder中载入用户控件,怎么触发用户控件事件,取得用户控件内web控件的值呢

发布时间:2011-06-22 16:43:00 文章来源:www.iduyao.cn 采编人员:星星草
在PlaceHolder中载入用户控件,如何触发用户控件事件,取得用户控件内web控件的值呢?
RT,有没有这方面的代码参考呀?

我的.aspx:


<%@   Page   Language= "VB "   Debug= "true "%>
<script   Language= "VB "   runat= "server ">
Sub   Page_Load(s   as   Object   ,   e   as   System.EventArgs)
        PlaceHolder1.Controls.Clear()  
PlaceHolder1.Controls.Add(LoadControl( "UserLogin_VB.ascx "))
End   Sub
</script>

<html>
<body>
<form   runat= "server ">
<asp:placeholder   id= "PlaceHolder1 "   runat= "server "> </asp:placeholder>  
</form>
</body>
</html>

------解决方案--------------------
试试使用findControl来找到控件
------解决方案--------------------
((窗口名)Context.Handler).控件名.value
------解决方案--------------------
把用户控件中要取的值做成属性

public string sValue
{
get
{
return this.TextBox1.value;
}
}
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: