Response.Clear(); Response.Buffer = true; Response.AddHeader("content-disposition","attachment;filename=DataAvailability.xls"); Response.Charset = ""; Response.ContentType = "application/vnd.ms-excel"; System.IO.StringWriter stringWrite = new System.IO.StringWriter(); System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite); gdvDataQualityReport.RenderControl(htmlWrite); gdvDataQualityReport.RenderControl(htmlWrite); Response.Write("<table>"); Response.Write(stringWrite.ToString()); Response.Write("</table>"); Response.End();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)