My website has been giving me intermittent errors when trying to perform any Ajax activities. The message I get is
Sys.WebForms.PageRequestManagerP
This may be a little hacky, but it solved the issue for me. I didn't have any of the common reasons for the error, so I just put in this band-aid in the page load:
if (Session.SessionID == "")
{
Page.Session.Add("SessionID", Session.SessionID);
}
I also got this error. The solution reported by "user1097991" solved it for a while (I was using not-serialized objects on viewstate)
But later the error returned again, now in a random fashion. After some search I got the answer: the viewstate was becoming too large and was been truncated. I disable some viewstates on grids and menus and the problem haven't shown again.
I had exactly the same error.
For me it was
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
Missing in the httpModules section of web.config (.Net 3.5 app)
This error seems to may be related to many various things.
I found that my issue was related to a nul character being rendered in the databinding of a GridView. The expected length of the response wasn't matching the actual length of the response text which resulted in the error being thrown. Once I fixed the data in the database, I no longer got the error. The ultimate fix will be to sanitize the text getting rendered during the RowDataBound event.
Looking through the database, I couldn't see the bad data since SQL Server 2008 doesn't show the text if the nul character (Char(0)) is in the string. In the RowDataBound event of my GridView, I added code to throw an exception for any text that had special characters in it. This is how I found the record that contained the nul characters.
tl;dr - Check for nul characters in the rendered html.
Problem: Sys.WebForms.PageRequestManagerParserErrorException will occur when redirecting your page, lets say button click inside UpdatePanel in aspxAjax.
SOlution:
Add a "GoTo" button in your aspx page where update panel is using and add it outside Update panel
In your code assign ur just registered userID to session variable , say Session["UseridJustregistered"]=Id
from DB or UsernameField
Respose.Redirect("regSucces.aspx?urlid='" + Session["UseridJustregistered"] + "'");
Check if Session["UseridJustregistered"]
is null or not
This is OLD Classic ASP way which can solve our problem , by the time Microsoft find a solution we can tackle it this way.
Please also be aware that this can be caused by not properly html encoding what you may be rendering to the page through partial postbacks.