string filename = "temp.html";
StreamWriter swXLS = new StreamWriter((MapPath("Logs\\")) + filename);
swXLS.Write(html.ToString());
swXLS.Close();
string attachment = "attachment; filename=" + filename;
Response.AddHeader("content-disposition", attachment);
Response.Redirect("~/Officer/Logs/temp.html");
Response.Write(html.ToString());
Response.End();