Stephen A. Fuqua (SAF) is a Bahá'í, software developer, and conservation and interfaith advocate in the DFW area of Texas.

AJAX RESPONSE Parsing Exception

August 8, 2007

Problem: In newly AJAX-enabled .Net 2.0 page, buttons that redirect user to another page are suddenly throwing the following 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 bycalls to Response.Write(), response filters, HttpModules, or server trace is enabled. Details: Error parsing near '<BODY><ASP_SMARTNAV_'.

Specifically, I had a small landing page with a few checkbox and a few buttons. I had wrapped these in an AJAX UpdatePanel. Below the panel is a Save button and a Reset button. These trigger updates to the UpdatePanel.

Solution: Eilon Lipton's Blog fully describes what is going on. My buttons inside the UpdatePanel were redirecting to another page. The fix was simple — add the buttons as regular PostBackTriggers so that the UpdatePanel would complete the postback properly.

1 Comment

Thanks for sharing your knowledge!
Saved me hours of banging my head on the keyboard :)