Thursday, September 21, 2006 - Posts

While your Waiting

Tip/Trick: UpdateProgress Control and AJAX Activity Image Animations

One of the cool new controls provided with the ASP.NET AJAX Extensions aka Atlas is the UpdateProgress control.  This control allows you to automatically cause UI to display on a page while an AJAX callback is in progress, and also allows you to provide UI to enable a user to optionally cancel the AJAX callback if it is taking too long.  To use this control on a page, simply declare it like so:

    atlas:UpdateProgress ID="progress1" runat="server">
        
ProgressTemplate>
        
            
div class="progress">
                
img src="indicator.gif" /> 
                Please Wait...
            div>
        
        
ProgressTemplate>
    
atlas:UpdateProgress>

ScottG has links to sites where you can download spinning gears and progress icons that you can use, he has a few examples ticking over on his blog.