Please note this example deos not work in Mozilla Firefox.
Demo:
<%@ Page Language="C#" %> <html> <head id="Head1" runat="server"> <script runat="server"> public void Save(object sender, EventArgs e) { System.Threading.Thread.Sleep(5000); this.lblLastUpdate.Text = DateTime.Now.ToString("hh:mm:ss"); } </script> </head> <body> <form id="form1" runat="server"> <asp:ScriptManager runat="server" ID="pageScriptManager"> </asp:ScriptManager> <script language="javascript" type="text/jscript"> Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function () { document.body.style.cursor = "auto"; }); Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(function () { document.body.style.cursor = "wait"; }); </script> <asp:UpdatePanel runat="server" ID="upnlInsertContent"> <ContentTemplate> <asp:Button runat="server" ID="btnSave" OnClick="Save" Text="Save" /> <asp:Label runat="server" ID="lblLastUpdate" /> </ContentTemplate> </asp:UpdatePanel> </form> </body> </html>
1 comment:
Thank you for posting, it quickly resolved my issue. It sure will help many developers
Post a Comment