Users Pricing

articles

home / developersection / articles / ajax toolkit update progress control in asp.net

Ajax Toolkit Update Progress Control in ASP.Net

Anonymous User 12679 02 Dec 2010 Updated 04 Mar 2020

With an Update Progress control, you can show the status during the partial-page rendering of an UpdatePanel.

Syntax:

<asp:UpdateProgress ID="UpdateProgress1" runat="server">

</asp:UpdateProgress>

Code:
Write these codes on aspx page
<%-- ScriptManager control manages client script for AJAX enabled ASP.NET pages--%>
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:UpdateProgress runat="server" id="PageUpdateProgress">
<%--ProgressTemplate Property  sets the template that defines the content of the UpdateProgress control.--%>         
<ProgressTemplate>
                Loading...
</ProgressTemplate>
</asp:UpdateProgress>
<asp:UpdatePanel runat="server" id="Panel">
<%--You need to place content of the page that you want to be in the UpdatePanel inside this--%>
<ContentTemplate>
<asp:Button runat="server" id="UpdateButton" onclick="UpdateButton_Click" text="Update Time" />
<asp:Label ID="Label1" runat="server"></asp:Label>
</ContentTemplate>
</asp:UpdatePanel>
 Write these code on button click
protected void UpdateButton_Click(object sender, EventArgs e)
{
        System.Threading.Thread.Sleep(3000);
        Label1.Text = DateTime.Now.ToString();
}

 Run the Project

When you click Update Time button then it shows the status during the partial-page rendering of an UpdatePanel. 

Ajax Toolkit Update Progress Control in ASP.Net

Ajax Toolkit Update Progress Control in ASP.Net



 


I am a content writter !


2 Comments