在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;
}
}