在pageload事件下

Response.ContenType = "Application/pdf";
string FilePath = MapPath("acrobat.paf");

Response.WriteFile(FilePath);

Response.End();


如果为其他文件类型
ContenType = Text/html
                      image/gif
                      text/plain
                      image/jpeg
                      Application/msword(word文件)
                     Application/ X-msexcel(execl 文件)

相关文章:

  • 2021-04-23
  • 2021-12-08
  • 2022-12-23
  • 2021-07-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-25
  • 2022-12-23
  • 2021-12-04
  • 2021-11-09
  • 2021-06-19
  • 2021-08-02
  • 2021-08-21
相关资源
相似解决方案