In this tutorial, we will introduce you to the AJAX UpdateProgress. This Control can be used to give the user more information about what is going on when AJAX is processing a request. Because AJAX is Asynchronous and runs in the background, there is no default status and the user doesn’t know if anything is happening or not, until the process is complete. This is not usually a problem on the faster servers, but we can use the UpdateProgress to tell the user that AJAX is dealing with the process and will complete soon.

First, we start by creating an AJAX-Enabled web site in Visual Studio .NET 2005, with the AJAX Extensions installed.
The AJAX Extensions (from Microsoft) make it a whole lot easier to create AJAX web pages, as Visual Studio will add in the necessary assembly references, etc. into the Web.config

When we first open our Default.aspx page, we should already have a Script Manager:

Next, we are going to add two UpdateProgress Controls, two UpdatePanel Controls. Inside the UpdateProgress will be the message displayed to the user when the AJAX is processing the request. We can also add an animated GIF in here, if preferred.

Note the attributes of the UpdateProgress Controls AssociatedUpdatePanelID and DynamicLayout. This allows us to have multiple UpdateProgress Controls on the same page, and each be associated with a different UpdatePanel. The DynamicLayout set to false will reserve space for the contents of this control. This means that there will be a space on the page for where the contents will appear.
The ASPX page will look something like this:

Now we can add logic to the buttons with the UpdatePanels. For this demonstration, we will make the script goto sleep for 5 seconds to show how the UpdateProgress is displayed.

Download Source Files