2
votes

I keep getting this error on asp.net page button click...how do i resolve this?

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 '

Thanks.

7
It would be helpful if you posted some code... what controls do you have on the page? UpdatePanels? AjaxControlToolkit? - Paul Rowland
ye...am using upatepanels ad ajaxtoolkit - Jimmy

7 Answers

5
votes

You might be using response.write, server.transfer or similar within updatepanel; avoid that.

refer to http://weblogs.asp.net/leftslipper/archive/2007/02/26/sys-webforms-pagerequestmanagerparsererrorexception-what-it-is-and-how-to-avoid-it.aspx

4
votes

Capture the server response using tools like Fiddler and inspect it.

2
votes

if you run script with ScriptManager, your id script is not unique. make your id script unique that will solve the problem.

2
votes

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 '

Solution: take out the button from the update panel.

1
votes

Use PostbackTriggers

0
votes

I'm using the telerik ajaxmanager and I got this error message when I put the ajaxmanager in a separate div outside of the div I was updating. I just moved the ajaxmanager div inside the other div like so:

<div id="divguts" runat="server">
   <div style="height:0px;width:0px;position:absolute;top:-100px;">
      <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
         <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
               <UpdatedControls>
                  <telerik:AjaxUpdatedControl ControlID="divguts" />
               </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="divguts">
               <UpdatedControls>
                  <telerik:AjaxUpdatedControl ControlID="divguts" />
               </UpdatedControls>
            </telerik:AjaxSetting>
         </AjaxSettings>
      </telerik:RadAjaxManager>
   </div>
   ...stuff I want to ajaxify + the buttons that trigger the postback
</div>
0
votes

It may occur when your given control ID is invalid.

Please check ControlID set for any ajax control.