Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have page, where user can choose where he wants to copy library element. Since copying can take longer time, I'd like to give some information that actually something is going on. It is also important that I'm using dialog.master for displaying this page in modal dialog.

To show processing message, I created UpdatePanel with label:

<asp:UpdatePanel ID="Infobox" runat="server">
  <ContentTemplate>
    <div class="ui-state-highlight">
      <asp:Label ID="StatusLabel" runat="server" Text="">
      </asp:Label>
    </div>
  </ContentTemplate>
</asp:UpdatePanel>

I also created UpdateProgress to display spinner image and text that something is going on:

<asp:UpdateProgress ID="Progress" runat="server"
AssociatedUpdatePanelID="Infobox">
  <ProgressTemplate>
  <img alt="Postep" src="/_layouts/images/ajax-loader.gif" />Trwa
  przenoszenie zasobu...</ProgressTemplate>
</asp:UpdateProgress>

I also added handler to OK button click event of dialog.master where I perform actual copying and after it is finished, I set text of StatusLabel. But content of UpdateProgreess never shows up, only the text of status label after copying is finished. I tried to register OkButton as UpdatePanel's trigger, but with no luck. I tried:

<Triggers>
  <asp:PostBackTrigger ControlID="OkButton" /><%--That gives exception that OkButton cant be found within update panel--%>
</Triggers>

and

<Triggers>
  <asp:AsyncPostBackTrigger ControlID="OkButton"
  EventName="Click" />
</Triggers>

I think what I'm looking for is way to make OkButton trigger update on UpdatePanel.

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

Try to keep all relevant controls (including buton) inside updatepanel. No need to use trigger here. If you keep button outside, it will be a postback and you will not see updateprogress.

share|improve this answer
add comment

since what you are trying to achieve is to show some kind of loading or processing indicator due to the long running operation. Have you tried SharePoint SPLongOperation

Hope this helps

share|improve this answer
    
shouldn't this be a comment instead of an answer ? –  Steve B Jan 4 '12 at 9:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.