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.
精彩评论