Groups | Blog | Home
all groups > asp.net > march 2004 >

asp.net : How to set default save filename?


Olav Tollefsen
3/4/2004 11:28:03 PM
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

Alvin Bruney [MVP]
3/9/2004 7:30:10 AM
Your post went unanswered. Have you resolved this issue? If you still need
help, please post the original question with your request.

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
[quoted text, click to view]

AddThis Social Bookmark Button