I created a page GetImage.aspx
of ContentType="image/jpeg"
that displays an image.
Page.Response.ContentType = "image/jpeg"
Page.Response.Flush()
However, when I download the image, the image is saved as "GetImage.jpg"
. Is there a way where I can change the title of the saved image without having to create another page with a different name?
In other words, how to set page titles for pages of ContentType="image/jpeg"
?
You can do it with content disposition.
Response.AddHeader("content-disposition", "attachment;filename=somefile.name")