I am trying to save my GridView data as an Excel file.
Here's my code
// Response.ContentType = "application/octet-stream";
// If you want the option to open the Excel file without saving then
// comment out the line below
Response.ContentType = "application/vnd.xls";
System.IO.StringWriter stringWrite = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);
It doesn't work and I get a I get an error about Managed Pipelines. After changing it to Integrated, I still cant get it to work.