ASP.Net AJAX – Export to Excel/Word


If you are using Update Panel and try to Export gridview contents to EXCEL or Word, your page will throw the following error. ”Sys.WebForms.PageRequestManagerParserErrorException”

Its because AJAX & Response.write don’t go together.  By calling Response.Write() directly you are bypassing the normal rendering mechanism of ASP.NET controls. The bits you write are going straight out to the client without further processing (well, mostly…). This means that UpdatePanel can’t encode the data in its special format.

There are couple of ways to solve this problem… Read the rest of this entry »