ASP.NET(C#)

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
在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 文件)
posted on 2005-02-28 09:16  battlerstar  阅读(448)  评论(0编辑  收藏  举报