开发者

How jQuery spinner for ASP.NET postback (not Ajax)? [duplicate]

This question already has answers here: 开发者_StackOverflow中文版 Detect when a browser receives a file download (24 answers) Closed 3 years ago.

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


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>


I have to say 2xUpdate Panel solution. This solution is quickly implimented and effective.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜