我有以下UpdateProgress:
<asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="updCampos"
DynamicLayout="true">
<ProgressTemplate>
<div class="carregando">
<span id="sAguarde">Aguarde ...</span> <asp:Image ID="Image1" runat="server" ImageUrl="~/images/loading.gif" />
</div>
</ProgressTemplate>
</asp:UpdateProgress>
我需要更改嵌套在“ sAguarde”跨度内的文本“ Aguarde ...”内容背后的代码,但是我不知道如何访问该跨度。语言是C#。
非常感谢您的帮助。
只需<span>
使用Label更改您的控件,如下所示-
<asp:Label id="sAguarde" Text="Aguarde ..." runat="server" />
并从以下代码后面访问它-
Label progressMessageLabel = UpdateProgress1.FindControl("sAguarde") as Label;
if (progressMessageLabel != null)
{
progressMessageLabel.Text = "something";
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句