string attachment = "attachment; filename=InvoiceReport.xls"; Response.ClearContent(); Response.AddHeader("content-disposition", attachment); // Response.AddHeader(Txt_fromdates.Text, attachment); Response.ContentType = "application/ms-excel"; StringWriter sw = new StringWriter(); HtmlTextWriter htw = new HtmlTextWriter(sw); grd_forSup.RenderControl(htw); Response.Write(sw.ToString()); Response.End();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)