0
votes

I have callBack panel on my page and in some reasons I have the next error:

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 < !DOCTYPE html PUB'.

It has some reasons "why" and you can find them here: first one and here: second

It's hard to solve the issue at this moment. need more investigation. That's why I try to catch this error from the client side after PerformCallback. So can I do the staff like that on the client side?

By the way when the error comes,there's page init event runs all the time (probably a few times in interval of 10-15 seconds) on the server side

1

1 Answers

0
votes

You could try:

Try
{
   //Do Things
}
catch (Exception e)
{
   Page.ClientScript.RegisterStartupScript(GetType(), "msgbox", "alert(" + ex.ToString() + ");", true); 
}

This posts a messagebox to the client with specifics of the exception, but I'm not sure why you would want to use this.