Response.ClearContent(); Response.AddHeader( "content-disposition", string.Format("attachment; filename={0}", FileName + ".xls") ); Response.Charset = ""; Response.ContentType = "application/excel"; StringWriter sw = new StringWriter(); HtmlTextWriter htw = new HtmlTextWriter(sw); gvPreview.RenderControl(htw); Response.Write(sw.ToString()); Response.End();
Response.Charset =
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)