我在母版页中有一个文字控件,我想从子页面中找到并填充它,但它总是返回 null
[MasterPage]
<asp:Literal ID="litStreamHtml" runat="server" />
[Child Page]
LiteralControl litStreamHtml = Master.FindControl("litStreamHtml") as LiteralControl;
litStreamHtml.Text = "some text";
我在母版页中有一个文字控件,我想从子页面中找到并填充它,但它总是返回 null
[MasterPage]
<asp:Literal ID="litStreamHtml" runat="server" />
[Child Page]
LiteralControl litStreamHtml = Master.FindControl("litStreamHtml") as LiteralControl;
litStreamHtml.Text = "some text";