How to fix Sys.WebForms.PageRequestManagerParserErrorException in AJAX

Most annoying issue with MS ASP.NET 2.0 Ajax  1.0 is the error Sys.WebForms.PageRequestManagerParserErrorException that will crash the web app. I found a great article from Eilon Lipton to help you avoid the error.


You will encounter this issue when  mixing callbacks and postbacks, as callbacks do not use Response.Write and there is not complete Requests to the server.


This is a bug on the MS ASP.NET 2.0 AJAX 1.0, is not that you are doing something wrong, the framework cannot handle the request validation and the exception is thrown. I  found that you can catch the exception using the Script manager; information about it here:


Or better yet, you can disable the error by disabling the request validation. On top of the webform add: enableEventValidation="false"


Hope this helps somebody.


UPDATE: setting enableEventValidation does not fix the problem in all the cases.


Cheers All

Reference :

/ 0 نظر / 79 بازدید