Simple steps to avoid Sys.WebForms.PageRequestManagerParserErrorException

This is a very irritating error message which we get specially with update panel and while solving it i have found a very easy solution to fix this. Although which took me a lot of effort and time and patience.

I have been working a lot to find this visited many sites but all in vain.
Finally i tried out this trick and it worked for me.

There are basically error with your AJAX Version or Script Manager

Add this Attribute to your script Manager EnablePartialRendering="true"

Like this

<ajaxToolkit:ToolkitScriptManager ID="_scriptManager" runat="server" ScriptMode="Release" CompositeScript-ScriptMode="Release" AllowCustomErrorsRedirect="False"
EnablePartialRendering="true" >
And in code behind write this code
Protected Sub _scriptManager_HandleErrors(ByVal sender As Object, ByVal e As AsyncPostBackErrorEventArgs) Handles _scriptManager.AsyncPostBackError
If e IsNot Nothing AndAlso e.Exception IsNot Nothing Then
Logger.Current.LogError(e.Exception.Message, e.Exception)
'Changed to catch the Error in Master Page Ajax Error Control Sys.webforms
_scriptManager.AsyncPostBackErrorMessage = e.Exception.Message
End If
End Sub


No responses found. Be the first to comment...

  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name: