Response.Clear(); Response.ContentType = "application/ms-excel"; Response.AddHeader("content-disposition", string.Format("attachment;filename={0}.xls", filename)); System.IO.StringWriter sw = new System.IO.StringWriter(); HtmlTextWriter hw = new HtmlTextWriter(sw); tb.RenderControl(hw); 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)