asp.net 打开excel浏览器兼容问题

沙客 沙客 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
string fileName = "表" + DateTime.Now.ToShortDateString();//文件的名称
this.Response.Clear();
this.Response.Charset = "gb2312 ";
this.Response.ContentEncoding = System.Text.Encoding.Default;
this.Response.ContentType = "application/vnd.ms-excel";
this.Response.AddHeader("Pragma", "public");
this.Response.AddHeader("Cache-Control", "max-age=0");
this.Response.AppendHeader("content-disposition", "attachment; filename=" + HttpContext.Current.Server.UrlPathEncode(fileName) + ".xls");
string colHeaders = "";
string ls_item = "";
System.IO.StringWriter stringWriter = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlTextWriter = new System.Web.UI.HtmlTextWriter(stringWriter);
this.EnableViewState = false;
为什么我在360上打开这个方法 文件下载那个提醒框一闪而过,而在火狐上没有问题

请问怎么解决这个问题,优先在ie6,ie7内核下能运行
谢谢
...全文

相关推荐

评论 6
收藏 已收藏
分享
返回顶部
沙客
.NET社区 62,272 成员 668,968 内容