I am new to Ajax and trying to integrate Ajax in my application(.NET framework 2.0)...I am facing an issue which i couldn't resolve...Here is the error message
System.WebForms.PageRequestManagerParserErrorException:The message received from the server could not be parsed. Common causes for this error are when the response is modified by the calls to Response.Write(),response filters, HttpModules or the server trace
is enabled..
I did find lot of forums with this Error Message but none of them were helpful....My web application doesn't have Response.Write, response.filters but i do have a HttpModule(which stores the cookie information), I modifed the code to handle the requests
from ajax differently using the code snipette
if (HttpContext.Current.Request.Headers["x-microsoftajax"] == null)
It is not a good practice to use Response.Write or server.execute from within an ASP.NET page in general. As UpdatePanels work by intercepting the page rendering process you are recieving the errors.
You can put the code to generate the data in an HTTPHandler or you can make the button a PostBackTrigger.
Because of the way updatepanels manage the DOM elements within them, you cannot use Response.Write() with them.
I think the problem is because of button control in the GridView...I tried to include Triggers inside the updatePanel, now its giving a different error message
A control with ID 'Button_Apply" could not be found for the trigger in UpdatePanel 'UpdatePanel_test'
PraveenAmar
Member
71 Points
89 Posts
ajax - PagerequestManagerParserErrorException
Jan 18, 2013 06:10 AM|LINK
I am new to Ajax and trying to integrate Ajax in my application(.NET framework 2.0)...I am facing an issue which i couldn't resolve...Here is the error message
System.WebForms.PageRequestManagerParserErrorException:The message received from the server could not be parsed. Common causes for this error are when the response is modified by the calls to Response.Write(),response filters, HttpModules or the server trace is enabled..
I did find lot of forums with this Error Message but none of them were helpful....My web application doesn't have Response.Write, response.filters but i do have a HttpModule(which stores the cookie information), I modifed the code to handle the requests from ajax differently using the code snipette
if (HttpContext.Current.Request.Headers["x-microsoftajax"] == null)
but still doesn't work....Any suggestions??
chetan.sarod...
All-Star
65739 Points
11138 Posts
Re: ajax - PagerequestManagerParserErrorException
Jan 21, 2013 02:15 AM|LINK
Hi
It is not a good practice to use Response.Write or server.execute from within an ASP.NET page in general. As UpdatePanels work by intercepting the page rendering process you are recieving the errors.
You can put the code to generate the data in an HTTPHandler or you can make the button a PostBackTrigger.
Because of the way updatepanels manage the DOM elements within them, you cannot use Response.Write() with them.
http://weblogs.asp.net/leftslipper/archive/2007/02/26/sys-webforms-pagerequestmanagerparsererrorexception-what-it-is-and-how-to-avoid-it.aspx
http://vijaymodi.wordpress.com/2007/04/13/syswebformspagerequestmanagerparsererrorexception/
http://forums.asp.net/t/1038252.aspx
Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.
PraveenAmar
Member
71 Points
89 Posts
Re: ajax - PagerequestManagerParserErrorException
Jan 21, 2013 06:09 AM|LINK
I think the problem is because of button control in the GridView...I tried to include Triggers inside the updatePanel, now its giving a different error message
A control with ID 'Button_Apply" could not be found for the trigger in UpdatePanel 'UpdatePanel_test'
PraveenAmar
Member
71 Points
89 Posts
Re: ajax - PagerequestManagerParserErrorException
Jan 22, 2013 01:16 PM|LINK
Any Suggestions....