当前位置: 代码迷 >> ASP.NET >> 取消报表上载有关问题
  详细解决方案

取消报表上载有关问题

热度:2313   发布时间:2013-02-25 00:00:00.0
取消报表下载问题
private void Export(string FileType, string FileName)
  {
  Response.Charset = "GB2312";
  Response.ContentEncoding = System.Text.Encoding.UTF7;
  Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(FileName,Encoding.UTF8).ToString());
  Response.ContentType = FileType;
  this.EnableViewState = false;
  StringWriter tw = new StringWriter();
  HtmlTextWriter hw = new HtmlTextWriter(tw);
  this.GridView2.RenderControl(hw);
  Response.Write(tw.ToString());
  Response.End();
  }
  public override void VerifyRenderingInServerForm(Control control)
  {
  }
找的这段导出EXCL代码。
我点报表后 取消下载,会自动关闭页面。能取消后不关闭页面么?

------解决方案--------------------------------------------------------
楼主是已经开始导出了吗?如果是,导出报表的时候不是瞬时间的事吗?哪有点击取消的时间啊~
  相关解决方案