在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
复制代码 代码如下: protected void btnExcel_Click(object sender, EventArgs e) { List<bUFlow.Model.orderhistory> orderlist = dal.GetOrderList2(""); string filename = "3g流量网龄升级计划用户表"; string name1 = filename; string bname = Common.MyRequest.GetBrowserName().ToLower(); if (bname.Contains("firefox")) { } else if (bname.Contains("ie")) { filename = HttpUtility.UrlEncode(filename, System.Text.Encoding.UTF8); } else { filename = HttpUtility.UrlEncode(filename, System.Text.Encoding.UTF8); } HttpResponse resp = System.Web.HttpContext.Current.Response; resp.Flush();
需要注意的是编码的问题,在输出的时候,最好加上以下语句: 复制代码 代码如下: <meta http-equiv="content-type" content="application/ms-excel; charset=gb2312"/> |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论