User265788195 posted
Response.Buffer = true;
Response.Clear();
Response.ContentType = mimeType;
Response.AddHeader("content-disposition", "attachment ; filename=MyReport." + extension);
Response.BinaryWrite(bytes);
Response.End();
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:UpdateProgress runat="server" ID="PageUpdateProgress" >
<ProgressTemplate>
<div id="IMGDIV" align="center" valign="middle" runat="server" style="position: absolute; width: 30px; height: 30px; left: 35%; top: 25%; visibility: visible; vertical-align: middle; border-style: inset; border-color: black; background-color: #c8d1d4;">
<asp:Image ID="Image1" runat="server" ImageUrl="~/Images/wait.gif" />
</div>
</ProgressTemplate>
</asp:UpdateProgress>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnGenerateExcel" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
<div>
<asp:Button ID="btnGenerateExcel" runat="server" CssClass="btn" Text="Open in Excel"
OnClick="btnGenerateExcel_Click" />
<rsweb:ReportViewer ID="rptMyReport" runat="server" ProcessingMode="Remote" Width="1067px"
Height="1034px" ShowCredentialPrompts="False">
</rsweb:ReportViewer>
</div>
My Update progress shows up and gives me this error:
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerParserErrorException:
The message received from the server could not be parsed. I googled a lot and found that it might be because update progress soes not do well with Response.BinaryWrite..
Any help please