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.