Tim Schmelter
Tim Schmelter

Reputation: 460108

UpdateProgress is not displayed on partial postback

i have some time consuming serverside function so i try to execute each function step by step and inform the user about the progress.

So my approach was:

But the problem is that the UpdateProgress-control will not be shown although i've set the AssociatedUpdatePanelID correctly. The functions are all triggered correctly and the labels are getting updated, only the UpdateProgress keeps invisible.

Have a look please:

<asp:UpdateProgress ID="UpdateProgress1" DynamicLayout="true" runat="server" AssociatedUpdatePanelID="UpdFormPanel" DisplayAfter="0">
    <ProgressTemplate>
        <div class="progress">
            <asp:Image ID="ImgProgress" runat="server" ImageUrl="~/images/ajax-loader-arrows.gif"
                ToolTip="loading..." />&nbsp;please wait...
        </div>
    </ProgressTemplate>
</asp:UpdateProgress>
<asp:UpdatePanel ID="UpdFormPanel" runat="server" UpdateMode="conditional" ChildrenAsTriggers="false">
    <ContentTemplate>
      ....
    </ContentTemplate>
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="btnShowUploadResult" EventName="Click" />
        <asp:AsyncPostBackTrigger ControlID="btnExtractFile" EventName="Click" />
        <asp:AsyncPostBackTrigger ControlID="btnShowResultView" EventName="Click" />
    </Triggers>
</asp:UpdatePanel>
<asp:Button ID="btnShowUploadResult" runat="server" CausesValidation="false" Text="hidden" Style="display: none" />
<asp:Button ID="btnExtractFile" runat="server" CausesValidation="false" Text="hidden" Style="display: none" />
<asp:Button ID="btnShowResultView" runat="server" CausesValidation="false" Text="hidden" Style="display: none" />

On this way i'm registering the javascript in the button-click event-handler:

AjaxControlToolkit.ToolkitScriptManager.RegisterStartupScript(Me.UpdFormPanel, GetType(String), "ShowResultView", "$get('" & Me.btnShowResultView.ClientID & "').click();", True)

Thank you in advance.

Upvotes: 0

Views: 2170

Answers (1)

Dustin Davis
Dustin Davis

Reputation: 14585

Are you setting the enabled or visible properties in the code behind anywhere? This could cause the page not to render the control. HAve you verified that the html is there? Are you sure you're correctly changing the style when you need to? Use firebug and set break points. Walk through the js.

Upvotes: 1

Related Questions