articles

Home / DeveloperSection / Articles / Ajax Toolkit Update Progress Control in ASP.Net

Ajax Toolkit Update Progress Control in ASP.Net

Anonymous User12034 02-Dec-2010

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

Syntax:

<asp:UpdateProgressID="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



 


Updated 04-Mar-2020
I am a content writter !

Leave Comment

Comments

Liked By