Jimmy
Jimmy

Reputation: 2106

AJAX PageRequestManagerParserErrorException error in asp.net page

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.

Upvotes: 2

Views: 35576

Answers (7)

Sagar Kulkarni
Sagar Kulkarni

Reputation: 686

It may occur when your given control ID is invalid.

Please check ControlID set for any ajax control.

Upvotes: 0

makhan
makhan

Reputation: 21

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.

Upvotes: 2

unknown
unknown

Reputation: 21

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

Upvotes: 2

JumpingJezza
JumpingJezza

Reputation: 5675

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>

Upvotes: 0

Mani
Mani

Reputation: 67

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

Upvotes: 5

Audlin
Audlin

Reputation: 11

Use PostbackTriggers

Upvotes: 1

Chetan S
Chetan S

Reputation: 23813

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

Upvotes: 4

Related Questions