Click here to Skip to main content
15,917,320 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am getting Sys.WebForms.PageRequestMangerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Reesponse.Write(), response filters, HttpMOdules, or server trace is enabled.

Details: Error parsing near
<html>
<head>


A) i have scriptmanger in my master page
<asp:ScriptManager ID="ScriptManagerMaster" EnablePageMethods ="true" runat="server"> 


B)This is where i m using the updatePanel in my page
<asp:UpdatePanel id="UpdatePanel1" runat="server" UpdateMode="conditional">
<contenttemplate><asp:DropDownList id="ddlSatellite" AutoPostBack ="true" runat="server"  OnSelectedIndexChanged = "ddlSatellite_SelectedIndexChanged" Height="20px" Width="137px" Font-Names="calibri, 10pt" Font-Size="10pt"  >    
<asp:TextBox id="txtSatelliteLongitude" runat="server" > </contenttemplate>


Checking done my me:
1. I have not used Response.write in my code
2. Also no trace is used in webconfig or page directive

Please help.
Posted
Updated 8-Feb-11 21:28pm
v2

1 solution

Check following reasons, and get some more details.
http://weblogs.asp.net/leftslipper/archive/2007/02/26/sys-webforms-pagerequestmanagerparsererrorexception-what-it-is-and-how-to-avoid-it.aspx[^]

Why do I keeping getting a PageRequestManagerParserErrorException?

Well, chances are you're doing one of the things mentioned in the error message. Here are the most common reasons and why they don't work:

Calls to Response.Write():
By calling Response.Write() directly you are bypassing the normal rendering mechanism of ASP.NET controls. The bits you write are going straight out to the client without further processing (well, mostly...). This means that UpdatePanel can't encode the data in its special format.

Response filters:
Similar to Response.Write(), response filters can change the rendering in such a way that the UpdatePanel won't know.

HttpModules:
Again, the same deal as Response.Write() and response filters.

Server trace is enabled:
If I were going to implement trace again, I'd do it differently. Trace is effectively written out using Response.Write(), and as such messes up the special format that we use for UpdatePanel.

Calls to Server.Transfer():
Unfortunately, there's no way to detect that Server.Transfer() was called. This means that UpdatePanel can't do anything intelligent when someone calls Server.Transfer(). The response sent back to the client is the HTML markup from the page to which you transferred. Since its HTML and not the special format, it can't be parsed, and you get the error.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900