How to set default save filename?

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
 

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

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top