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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top