SAF(NET) = STEPHEN A. FUQUA operating on the Web since 1995

Stephen is a web developer, Bahá'í, and interfaith activist in St. Paul, Minnesota. He likes to write about religion, social justice, sustainability, science, programming, &c.

August 8, 2007

AJAX RESPONSE Parsing Exception

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.

Comments

Drew — October 12, 2007

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

Post a comment

Remember personal info?




deprecated

On safnet.com

Other sites managed or developed by S.A.F.

S.A.F. elsewhere on the web

  • LinkedIn
    LinkedIn can actually be useful when looking for prospective hires and business or organizational partners
  • GoodReads
    A fun and relatively-unknown social networking site geared towards one's book list
  • Live Journal
    Mirror of the blog at safnet.com, so that a few LJ friends can more easily read and comment there