ajax "loading" icon with UpdatePanel postbacks

Kyle picture Kyle · May 11, 2010 · Viewed 64.5k times · Source

I have a form that is being dynamically built depending on user selection using Ajax (built in .NET Ajax with UpdatePanel).

how can I insert a "standard" ajax loading icon (maybe have it attached to the mouse pointer) while the postback is happening then remove it when the post back is finished?

I do have the AjaxToolKit installed if that helps.

Answer

Pranay Rana picture Pranay Rana · May 11, 2010

use updateprogress of tool kit :hope this will help you

<asp:updatepanel id="ResultsUpdatePanel" runat="server">    
<contenttemplate>

<div style="text-align:center;">
    <asp:updateprogress id="UpdateProgress1" runat="server" associatedupdatepanelid="ResultsUpdatePanel" dynamiclayout="true">
                        <progresstemplate>

                           <img src="support/images/loading.gif">

                        </progresstemplate>
                    </asp:updateprogress>

                    </div>

 //your control code
</contenttemplate>
</asp:updatepanel>