使用UpdateProgress时更改消息

时间:2012-03-30 12:57:37

标签: ajax

我不知道这是否可行,但我想知道在使用Ajax时是否有办法在UpdateProgress中更改消息。我尝试将消息放在标签中,由于某种原因,我不能这样做,所以只是想知道你可以怎么做。以下是我的内容。

   <asp:UpdateProgress ID="UpdateProgress1" runat="server">
    <ProgressTemplate>
          Logining In...
    </ProgressTemplate>
   </asp:UpdateProgress>

1 个答案:

答案 0 :(得分:1)

就这样做

页:

<asp:UpdateProgress ID="UpdateProgress1" runat="server" ClientIDMode="Static"> <ProgressTemplate> <div id="overlay"> <asp:Label ID="lbl_wait" runat="server" clientIDMode="Static">Logining In...</asp:Label> </div> </ProgressTemplate> </asp:UpdateProgress>

代码:

(UpdateProgress1.FindControl("lbl_wait") as System.Web.UI.WebControls.Label).Text = "Logged In...";