This is an ASP.NET 3.5 web app written C# using VS2008. The app runs in a medium trust environment on our intranet. This page of the app connects to an MS SQL backend to populate a gridview on the webform. There are also other text elements and things on the webform. The customer's requirements are that the entire page be exported to Word so it can be emailed or saved.
Exporting the entire page or just the gridview to Excel works fine. Exporting just the gridview to Word works just fine. The problem comes in when exporting the entire page to Word, like when a manager wants to produce a report and email it to upper management.
This is the method I'm using to grab the entire page and export it to Word.
public static void ExportPageToWord(string reportName, Panel pn)
{
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.Buffer = true ...
Go to the complete details ...