locked
Problem with UpdateProgress and PostBackTrigger RRS feed

  • Question

  • User2001833234 posted

    Could someone help:  I have a project where I'm using the 'FileUpload' Control in an update panel.  In order to make the control work correctly I needed to add a 'PostBackTrigger' for the button that is used to process the file from the FileUpload control.  That all works fine other than the program processes a lot of data and needs a progress bar to show the user that its still working.  I have tried using the Ajax 'UpdateProgress' control but it will not work when the button (causing the Async post) has a PostBackTrigger associated with it.

    Note: if you take off the Trigger, the UpdateProgress works just fine but the FileUpload fails. 

    I have run into this issue before with the FileUpload control.  Any suggestions would really be appreaciated.

    Here is a simple example

    <form id="form1" runat="server">
        <div>
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
     
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                    <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
                    <asp:FileUpload ID="FileUpload" runat="server" />
                    <asp:Button ID="Button1" runat="server" Text="Button"/>
                </ContentTemplate>
                <Triggers>
                    <asp:PostBackTrigger ControlID="Button1" />
                </Triggers>
            </asp:UpdatePanel> 
     
            <asp:UpdateProgress ID="updProgress" runat="server">
                <ProgressTemplate>
                    <div id="load" class="asyncPostBackPanel">
                        <img src="Images/indicator.gif" alt="Loading..." />
                        Loading...
                    </div>
                </ProgressTemplate>
            </asp:UpdateProgress>
     
        </div>
        </form>
    Friday, April 20, 2012 3:28 PM

All replies