日期:2014-05-17 浏览次数:20428 次
response.Clear();
response.AddHeader("content-disposition", string.Format("attachment; filename={0}.xls", HttpUtility.UrlEncode(Encoding.UTF8.GetBytes(fileName))));
response.ContentType = "application/vnd.ms-excel";
response.Charset = "GB2312";
response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
response.Write(string.Format(@"<html><head><meta http-equiv=Content-Type content=""text/html; charset=GB2312""><style>{0}</style><script type='text/javascript'>{1}</script></head><body>", GetStyleForTravelLine(), GetJavascriptForTravelLine(OrderNumber, OutString)));
response.Write(content);
response.Write("");
response.Write("</body></html>");
response.Flush();
try
{
response.End();
}
catch { }