menu

天魔窟

勇往直前

Avatar

Best of the Best: Top 10 Articles of 2003 from aspnetpro.com

Export to Excel
Make a Progress Indicator For Slow-Loading Pages
Real-World DataGrid Editing
9 Data-Access Best Practices Tips
Create Rich-Looking Apps
Rewrite URLs on the Fly
Parse File Paths and URLs in a Heartbeat
Upload With Ease
Hash Passwords for Added Security
ASP.NET Tip-a-Thon

Pasted from 博客堂.

好文章...问天魔一个我前两天遇到的问题..

我用如下的代码向客户端返回一个图片...

ContentType = "image/jpeg"

Response.AddHeader "Content-Disposition", "attachment; filename=" & flName
Response.AddHeader "Content-Length", flsize

Response.Charset = "UTF-8"
Response.ContentType = ContentType

Response.BinaryWrite objStream.Read
Response.Flush

为什么有的图片就能显示出来,有的就直接弹出下载窗口了..

当然..还是asp的..

浏览器回认为是图片直接在IE中查看,有的情况可能会认为是下载。具体不太清楚。。。。

我同pcman,假如客户端设置JPEG文件由IE打开,则直接显示,否则就提示下载……

我是自己测试的...所以不存在二位所说的问题..

评论已关闭