ASP.NET AJAX: Firing an UpdatePanel after the page load is complete

后端 未结 8 2426
情深已故
情深已故 2021-02-15 07:35

I\'m sure this is easy but I can\'t figure it out:

I have an ASP.NET page with some UpdatePanels on it. I want the page to completely load with some \'Please w

相关标签:
8条回答
  • 2021-02-15 08:14

    Doing things like this with UpdatePanels rather than something easily understandable WILL bite you, it's just a matter of when.

    0 讨论(0)
  • 2021-02-15 08:19

    From the very first question on this post, I think what the user is looking for is a message to be displayed to the user while the update panel loads. Just put an UpdateProgress control like the one below on your page just above your UpdatePanel control, and feel free to trigger an event in your UpdatePanel, put your backend code as usual, and whatever is contained inside the UpdateProgress control will load up while your UpdatePanel content is being processed in the backend.

    <asp:UpdateProgress AssociatedUpdatePanelID="UpdatePanel1" ID="UpdateProgress1" runat="server">
      <ProgressTemplate>
        <div class="mystyleclass">
          Please Wait...
        </div>
      </ProgressTemplate>
    </asp:UpdateProgress>
    

    There is no need for any messy manual javascript stuff.

    0 讨论(0)
提交回复
热议问题