string attachment = "attachment; filename=" + strFileName;Response.Clear();Response.Buffer = true;Response.AddHeader("content-disposition", attachment);Response.ContentType = "application/vnd.ms-excel";Response.Charset = "";Response.Write(TopContent.InnerHtml);StringWriter oStringWriter = new StringWriter();HtmlTextWriter oHtmlTextWriter = new HtmlTextWriter(oStringWriter);divExport.RenderControl(oHtmlTextWriter);Response.Write(oStringWriter.ToString());
Thanks & Regards, Krishna
Login to post response