Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
UpdateProgress not working with download file. Please see below code, in this code i have used updatepanel ans updateprogress.

on btnGenerateReport click i am downloading a excel file. On the Download option Pop up if i click on Open,Save Or Cancel Button then also still the Update Progress is spinning.Here i had Used Post back trigger because i m using File Upload COntrol and Showing the Update Progress from javascript.
Please help me to resolve this issue as i want that after Opening/Cancelling /Saving the excel the Update progress get hide.I had also tried to Hide the Div in which the Update Progress is there but it is also not working.
I m Not getting any error but the "Waiting image", i had put in the <progresstemplate> is still showing and not getting disappear after downloading/Cancelling/Saving the File from the Download Pop up appears.

<asp:ScriptManager ID="ScriptManager1" runat="server" enablepagemethods="true" />    
 <script type="text/javascript">
        var updateProgress = null;

        function postbackButtonClick() {
            updateProgress = $find("<%= UpdateProgress.ClientID %>");
            window.setTimeout("updateProgress.set_visible(true)", updateProgress.get_displayAfter());
            return true;
        }
</script>
 <asp:UpdatePanel ID="UpdPanel" runat="server" UpdateMode="Conditional">
 <ContentTemplate> 
<div id="EQDUMPUpload"  runat="server" align="center" 
        style="position: relative; z-index: inherit; width: auto; height: auto; top: auto; right: auto; bottom: auto; left: auto">
<table >
<tr>
<td>
    <asp:Label ID="Label1" runat="server" 
        Text="Step 1 : Upload the ReportEQ File" Font-Bold="True" ForeColor="Blue"></asp:Label>
    </td>
<td>
    <asp:FileUpload ID="EQDumpUploader" runat="server" />
</td>
</tr>
<tr>
<td></td>
<td>
</td>
<td></td>
</tr>
</table>
</div>
<div id="HRISUpload"  runat="server" align="center" 
        style="position: relative; z-index: inherit; width: auto; height: auto; top: auto; right: auto; bottom: auto; left: auto">
<table >
<tr>
<td><asp:Label ID="Label2" runat="server" 
        Text="Step 2 : Upload the HRISInfo File" Font-Bold="True" ForeColor="Blue"></asp:Label></td>
<td>
   <asp:FileUpload ID="HrisUploader" runat="server" />
</td>
</tr>
<tr>
<td></td>
<td>
</td>
<td></td>

</tr>
</table>
</div>
<div id="GenerateReportDiv"  runat="server" align="center"    style="position: relative; z-index: inherit; width: auto; height: auto; top: auto; right: auto; bottom: auto; left: auto">
<table>
<tr>
<td>    
    <asp:Button ID="btnGenerateReport" runat="server" Text="Generate Allocation Report" 
        onclick="btnGenerateReport_Click"  Font-Names="Verdana" Font-Size="10pt" 
        UseSubmitBehavior="True" OnClientClick="return postbackButtonClick();" ClientIDMode="Static"  />        
</td></tr>
</table>
</div>
<div id="divConfirmation"  runat="server"  align="center" style="position: relative; z-index: inherit; width: 930px; height: auto; top: 0px; right: 0px; bottom: 0px; left: 0px">
        <table>
        <tr>
        <td>
<asp:Label ID="lblCnfrm" runat="server" Text="Label" Font-Bold="True" ForeColor="Red" Font-Names="Verdana" Font-Size="Small" ></asp:Label>
        </td>
        </tr>
        <tr>
        <td>
<asp:Label ID="lblHRISCnfrm" runat="server" Text="Label" Font-Bold="True" ForeColor="Red" Font-Names="Verdana" Font-Size="Small" ></asp:Label>
        </td>
        </tr>
        <tr>
        <td>
<asp:Label ID="lblAllocationCnfrm" runat="server" Text="Label" Font-Bold="True" ForeColor="Red" Font-Names="Verdana" Font-Size="Small" ></asp:Label>
        </td>
        </tr>
        </table>
        </div>
 </ContentTemplate>
 
<Triggers>
<asp:PostBackTrigger ControlID="btnGenerateReport"  />
</Triggers>
</asp:UpdatePanel>
<div id="divUpdateProgress"  runat="server">
 <asp:Updateprogress id="UpdateProgress" runat="server" 
        associatedupdatepanelid="UpdPanel">
                    <Progresstemplate>
                    <div id="Layer1"  style="removed:absolute; z-index:1; removed 50%;removed 50%;">
                        <img src="Images/waiting.gif" alt="" />
                        </div>              
                    </Progresstemplate>
            </asp:Updateprogress> 
            </div>   
</asp:Content>
Posted
Updated 1-Mar-12 1:58am
v2
Comments
Varun Sareen 1-Mar-12 3:54am    
are you getting any error?
Dharmenrda Kumar Singh 1-Mar-12 4:22am    
I m Not getting any error but the "Waiting image", i had put in the <ProgressTemplate> is still showing and not getting disappear after downloading/Cancelling/Saving the File from the Download Pop up appears.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900