【发布时间】:2013-05-20 18:41:27
【问题描述】:
在我的 ASP.NET 应用程序中,我有更新面板和自定义服务器控件。
此自定义控件具有内部文字控件。我尝试以编程方式设置它的文本属性。但它不会呈现,因为字面量控制在更新面板中。
我该如何解决这个问题?非常感谢。
这是我的代码:
<asp:UpdatePanel runat="server" ID="updPanel">
<ContentTemplate>
<st:AspGridViewTitlePanel runat="server" ID="GridTitle" Width="100%">
</st:AspGridViewTitlePanel>
</ContentTemplate>
</asp:UpdatePanel>
AspGridViewTitlePanel - 这是我的服务器控件。它有这样的代码:
this.myLiteralControl = new LiteralControl();
this.myLiteralControl.Text = "Some text";
【问题讨论】:
-
请发布您的代码。
标签: asp.net updatepanel literals