views:

23

answers:

1

Using VS 2010 here. Basically some of my linkbuttons kick off a long database query, how can I automagically display a spinner when the page is waiting for a postback? Mind you, this isn't an ajax postback, but a normal postback after clicking a server linkbutton.

Thanks

A: 

why dont you use update panel?

using update panel you can easily set the loading image until your call comes back.

                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                        <asp:UpdateProgress ID="UpdateProgress11" runat="server" DisplayAfter="0" AssociatedUpdatePanelID="UpdatePanel1">
                            <ProgressTemplate>
                               <asp:Image ID="Image11" runat="server" ImageUrl="~/Images/etls/preloader.gif" />
                            </ProgressTemplate>
                        </asp:UpdateProgress>
                        <table border="0">
                            <tr>
                                <td>
                                   Your content here, with the button.
                                </td>
                            </tr>
                        </table>
                    </ContentTemplate>
                </asp:UpdatePanel>
Zain Shaikh
I avoid the AjaxControlToolkit at all costs.
bulltorious
this is not AjaxControlToolkit, this is the control of ASP.Net.
Zain Shaikh