Search code examples
c#asp.netajaxupdatepanelpostback

ajax "loading" icon with UpdatePanel postbacks


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.


Solution

  • 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>