ASP.NET(C#)

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
  184 随笔 :: 3 文章 :: 85 评论 :: 0 引用

公告

在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 阅读(271) 评论(0) 编辑 收藏