(Solution to Sys.WebForms.PageRequestManagerParserErrorException)
You may face problem when you write download file logic in aspx page code behind while the the control that fires the event to download file is in update panel. If you use Response.Write() or Response.BinaryWrite() method as shown below in async postback you will encounter Sys.WebForms.PageRequestManagerParserErrorException.
Page’s markup
1.<asp:scriptmanager id="ScriptManager1" runat="server">2.asp:scriptmanager>3.<asp:updatepanel id="UpdatePanel1" runat="server">4.<contenttemplate>5.<asp:button id=" ButtonDownload" runat="server"onclick="ButtonDownload_Click" text="Download"> >6.asp:button>contenttemplate>7.asp:updatepanel>