Wednesday, December 21, 2011

ASP.NET UpdatePanel and PageRequestManagerParserErrorException

I have a page that contains an UpdatePanel that gets updated every 2 seconds to poll for information from the server. With a certain combination of the application running, the UpdatePanel would not refresh in Internet Explorer, but worked fine in Firefox. I finally tracked it down to the UpdatePanel throwing a PageRequestManagerParserErrorException when the data was coming back from the server. There is plenty of information out there about common reasons why this exception is thrown. However, none of those suggestions are valid for my particular need, which is why I can post about it here.

The data coming back from the server included non-displayable characters. Firefox handled this gracefully by displaying a little glyph in the place of the non-displayable characters. Internet Explorer choked on the non-displayable characters. Since I have some control over the data that gets sent to the view, I intercept the non-displayable characters and change them to ‘?’. Now both Internet Explorer are handling the refreshing correctly.

No comments:

Post a Comment