首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > VB Dotnet >

vs2005里webform中,如何在网页中输出附件(word,pdf,html,excel等)

2012-01-09 
vs2005里webform中,怎么在网页中输出附件(word,pdf,html,excel等)?我根据id,获得附件的在服务器上的地址ad

vs2005里webform中,怎么在网页中输出附件(word,pdf,html,excel等)?
我根据id,获得附件的在服务器上的地址address,
然后直接Response.WriteFile(address)
在页面上显示的是乱码,并且会弹出一个crack,
怎么让附件正常显示啊 ?

[解决办法]
Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(url, System.Text.Encoding.UTF8)) 
----->
 Response.AppendHeader("Content-Disposition", "inline;filename=" + HttpUtility.UrlEncode(url, System.Text.Encoding.UTF8)) 

热点排行