How to set default save filename?

  • Thread starter Thread starter Olav Tollefsen
  • Start date Start date
O

Olav Tollefsen

I have an .aspx file with the following code in Form_Load:

image = System.Drawing.Image.FromFile(imageFilename);
Response.ContentType = "image/jpeg";
image.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg);

I'm using this to display images in the browser using an URL like this:

http://localhost/GetPhoto.aspx?Resolution=L1&PhotoId=50052095

The problem is that when I use "Save Picture As..." from the browser, the
default filename in the Save As... dialog is "GetPhoto.aspx". This is quite
meaningless for a picture.

I would like the default filename to be "50052095.jpg".

Is this possible?

Olav
 
Your post went unanswered. Have you resolved this issue? If you still need
help, please post the original question with your request.
 
Back
Top