Sys.Webforms.Pagerequestmanagerparsererrorexception: the Message Received from the Server Could Not Be Parsed

Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed

I fixed this issue. As I'm using UpdatePanel, I added below code in the Page_Load event of the page and it worked for me:

protected void Page_Load(object sender, EventArgs e) {
ScriptManager scriptManager = ScriptManager.GetCurrent(this.Page);
scriptManager.RegisterPostBackControl(this.btnExcelExport);
//Further code goes here....
}

Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed - Link Button within Gridview

The problem is that those controls are in a template so you cannot reference them directly. Use the RowDataBound event and assign the buttons a trigger programatically.

protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
//check if the row is a datarow and not the first row
if (e.Row.RowType == DataControlRowType.DataRow)
{
//find the button with findcontrol
LinkButton lb = e.Row.FindControl("lnkLogFiles") as LinkButton;

//assign the button as a postback trigger
ScriptManager.GetCurrent(Page).RegisterPostBackControl(lb);
}
}

ASP.NET Ajax Error: Sys.WebForms.PageRequestManagerParserErrorException

There is an excellent blog entry by Eilon Lipton. It contains of lot of tips on how to avoid this error:

Sys.WebForms.PageRequestManagerParserErrorException - what it is and how to avoid it

Read the comments too. There is a comment of somebody with the same problem: "I solved it changing server idle time of my app pool on IIS. It was only 5, so I incremented it and now works."

"The UpdatePanel control uses asynchronous postbacks to control which parts of the page get rendered. It does this using a whole bunch of JavaScript on the client and a whole bunch of C# on the server.

Asynchronous postbacks are exactly the same as regular postbacks except for one important thing: the rendering. Asynchronous postbacks go through the same life cycles events as regular pages (this is a question I get asked often).

Only at the render phase do things get different. We capture the rendering of only the UpdatePanels that we care about and send it down to the client using a special format. In addition, we send out some other pieces of information, such as the page title, hidden form values, the form action URL, and lists of scripts."

Most common reasons for that error:

  1. Calls to Response.Write():
  2. Response filters
  3. HttpModules
  4. Server trace is enabled
  5. Calls to Server.Transfer()

Sys.WebForms.PageRequestManagerParserErrorException

this working fine for me because the button is include Telerik grid

I add the following :

<Triggers>
<asp:PostBackTrigger ControlID="gvAllDocuments" />
</Triggers>

How to fix error: The message received from the server could not be parsed

The action that causes this code to execute MUST be a postback event, and not an AJAX call.

This is due to the nature of the way AJAX requests are processed.

Error: Sys.WebForms.PageRequestManagerparserErrorException: The message received from the server could not be parsed

Finally, i found the solution. Nothing given in online blogs matched to my issues, problem was from database side.

Tahnks..!!



Related Topics



Leave a reply



Submit