Home > DeveloperSection > Beginner > Ajax Toolkit Update Progress Control in ASP.Net

Ajax Toolkit Update Progress Control in ASP.Net


AJAX AJAX 
Ratings:
0 Comment(s)
 7555  View(s)
Rate this:

Ajax Toolkit Update Progress Control in ASP.Net


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. 

AjaxControl Toolkit UpdateProgress Control in ASP.Net

AjaxControl Toolkit UpdateProgress Control in ASP.Net

 


Don't want to miss updates? Please click the below button!

Follow MindStick