locked
Response.BinaryWrite(bytes); and Update Progress RRS feed

  • Question

  • 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="positionabsolute;                         width30pxheight30pxleft35%top25%visibilityvisiblevertical-alignmiddle;                         border-styleinsetborder-colorblackbackground-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

    Wednesday, October 23, 2013 1:04 PM

Answers