62,054
社区成员
发帖
与我相关
我的任务
分享
string fileName = "export.xls";
this.Response.ContentType = "application/vnd.ms-excel";
this.Response.AddHeader("Content-Disposition", string.Format("attachment;filename={0}", System.Web.HttpUtility.UrlEncode(fileName)));
this.Response.BinaryWrite(ms.GetBuffer());
Response.Flush();
Response.Clear();
Thread.Sleep(5000);
this.Response.Write("<script>alert('导出成功。')</script>");
Response.Flush();
this.Response.End();