When you’ve used ASP.NET AJAX’s UpdatePanel you may have come across this error. Its typical message is:
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.

If you get this error, the first thing everyone does is to check whether they have any of the things they were not supposed to be doing:
- Calling Response.Write()
- Using response filters or HttpModules
- Having Server Trace enabled.
If you check those things and are positive that they are not the case, you’re lost. Well as it turns out, there’s a fourth hidden option:
Calling Server.Transfer method.
The thing is, when you call Server.Transfer, the server generates HTML for the next page and sends it directly to the client which was expecting some part of the page that was supposed to be returned via AJAX. This generates PageRequestManagerParserErrorException. So, you cannot use Server.Transfer method.
Well, actually you can, but it cannot be an asynchronous call.
So if the button is inside the UpdatePanel it will automatically use asynchronous calls. Luckily, there are two ways to force it to make a full postback.
- If the button is created statically, then simply register it a as a PostBackTrigger.
- If the button is created dynamically, call ScriptManager.RegisterPostBackControl with the necessary button.