.aspx code
<div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<center>
<div><asp:Button ID ="btnUpdate" runat="server" Text="Update"
onclick=" btnUpdate_Click"/>
<br />
<asp:Label ID ="label1" runat
="server">asp:Label>
div>
center>
ContentTemplate>
asp:UpdatePanel>
<asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1" DisplayAfter="3000" DynamicLayout
="true">
<ProgressTemplate>
<center><img id="Img1" src="Images/progressbar.gif" height="50" width="50" runat="server"
/>center>
ProgressTemplate>
asp:UpdateProgress>
div>
.aspx.cs
code
protected void btnUpdate_Click(object
sender, EventArgs e)
{
System.Threading.Thread.Sleep(5000);
label1.Text = "Page
refreshed at" + DateTime.Today.ToLongDateString()
+ "" + DateTime.Now.ToLongTimeString();
}
Comments