if (ContentByte == null)
                return;
            string downLoadFileName = Name + "." + ByteUitl.FileType(ContentByte);
            Response.ContentType = "application/octet-stream";
            //通知浏览器下载文件而不是打开
            Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(downLoadFileName, System.Text.Encoding.UTF8));
            Response.BinaryWrite(ContentByte);
            Response.Flush();
            Response.End();

相关文章:

  • 2021-05-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-11
  • 2022-12-23
猜你喜欢
  • 2022-01-08
  • 2021-07-15
  • 2021-05-28
  • 2022-12-23
  • 2022-02-15
  • 2021-05-22
  • 2022-12-23
相关资源
相似解决方案