0
votes

I am using an UpdatePaenl in an asp.net page. It has a button to trigger it. I'm able to show "Loading" when the button is pressed. Here my issue, I need it to show "Loading" when the page is first called, not just when a button is pressed.

Any ideas are greatly appreciated. Thanks

2
I have the same requirement and have not yet found a solution. As far as I know you cannot trigger the loading image, other than by forcing a postback - edosoft
What needs to show the "loading", the text of the button or the content of the updatepanel before it is loaded? Are you using an UpdateProgress control? - Peter
Maybe wrap the whole page in the update panel and set the childern as trigger to true and update mode to alway then have it fire in the page load event for a set of time? - Jack

2 Answers

1
votes

Here's some example code that I created for a photogallery widget:

<div>
    <asp:UpdateProgress ID="UpdateProgress1" AssociatedUpdatePanelID="updatePanel1" runat="server">
        <ProgressTemplate> 
            <img src="images/busybar.gif" alt="Loading..." style="margin-right:auto; margin-left:auto; position:fixed; top:60%; left:50%;" />
        </ProgressTemplate>
    </asp:UpdateProgress>
    <asp:UpdatePanel ID="updatePanel1" runat="server">
    <ContentTemplate>
        <uc1:PhotoAlbumThumbnails ID="PhotoAlbumThumbnails1" runat="server" ItemsPerPage="30" />
    </ContentTemplate>
</asp:UpdatePanel>
</div>