开发者

How to download image from browser asp.net

Is there any way i can download ima开发者_如何学运维ge using asp.net

I want to dialog box opened to save it

Thanks


Create a link to a download page like this:

Download.aspx?Image=whatever.jpg

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜