Convert HTML Page to .doc, xls



public
void HTMLToOthers(string filename, string filetype)
{
if (filename.Trim() != "")
{
Response.ContentType = "application/vnd" + filetype;
Response.AddHeader("content-disposition", "attachment;filename=" + filename);
System.IO.
StringWriter stringWrite = new System.IO.StringWriter();
System.Web.UI.
HtmlTextWriter htmlWrite = new System.Web.UI.HtmlTextWriter(stringWrite);
System.Web.UI.
Page sPage = new System.Web.UI.Page();
sPage.RenderControl(htmlWrite);
Response.Write(stringWrite.ToString());
}



}
Ebook Download
View all
Learn
View all