如何下载浏览器asp.net图像 [英] How to download image from browser asp.net
本文介绍了如何下载浏览器asp.net图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有什么办法,我可以使用下载的图像asp.net
Is there any way i can download image using asp.net
我要对话框打开,保存
感谢
推荐答案
创建一个链接到下载页面是这样的:
Create a link to a download page like this:
Download.aspx?Image=whatever.jpg
,然后在Download.aspx设置内容标题:
and then in Download.aspx set the content headers:
Response.ContentType = "image/jpeg";
Response.AddHeader("Content-Disposition", "attachment; filename=whatever.jpg");
浏览器将显示一个保存对话框,而不是显示它的。
The browser will display a save dialog instead of displaying it.
这篇关于如何下载浏览器asp.net图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文