Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1007919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T08:41:27+00:00 2026-05-16T08:41:27+00:00

*Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be

  • 0

*Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near ‘�PNG

‘.*

if i remove the <asp:updatepanel its all working fine

protected void gvFiles_RowCommand(object sender, GridViewCommandEventArgs e)
{
    if (e.CommandName == "Download")
    {
        byte[] byteArray = item.AttachContent.ToArray();
        Response.Clear();
        Response.AppendHeader("Content-Disposition", "attachment; filename=\"" + item.AttachFileName + "\"");
        Response.AppendHeader("Content-Length", byteArray.Length.ToString());
        Response.ContentType = "application/octet-stream";
        Response.BinaryWrite(byteArray);
        Response.End();
    }
}
  • 1 1 Answer
  • 3 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T08:41:28+00:00Added an answer on May 16, 2026 at 8:41 am

    This is occurring because you are trying to do a Response.BinaryWrite.

    You get this error because because you are trying to return non HTML to the UpdatePanel using an asynchronous callback which is not allowed. The only thing I can suggest is to try using a PostBackTrigger and targetting a control outside of your UpdatePanel.

    The best solution would be to make you download button spawn another window that calls an .ashx (generic handler) and server up the binary via the ashx. You can just attach a javascript function to handle the click which will open a new window to the ashx with whatever params are needed passed in.

    This link has more information on the exact problem and ways of solving it.

    There are several ways to fix this
    problem each fix has specific scops.

    1.Register ButtonDownload PostBackTrigger control in Triggers
    child tag of the update panel as shown
    below.

    2.You can also use RegisterPostBackControl method of the
    ScriptManager control in Page_Load as
    shown below.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting the error Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Error executing child request for
Why I got this error Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Invalid postback or callback
My error is Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing
I get the following error from my code execution: Microsoft JScript runtime error: Could
I am getting a Microsoft JScript runtime error: 'Sys' is undefined error on one
I am getting the following error: Microsoft JScript runtime error: 'Sys' is undefined While
Problem 1 Error: Microsoft JScript runtime error: '$.fn' is null or not an object
I'm getting the dreaded Microsoft JScript runtime error: 'Sys' is undefined error while trying
Error : Microsoft JScript runtime error: 'ctl00_ContentPlaceHolder1_txtAdmDate' is undefined Code : <input ID=txtAdmDate runat=server
I keep getting the following error message: Microsoft JScript runtime error: '$' is undefined

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.