Saturday, July 22, 2006

This is something I always forget how to do. When you use the Response stream to output a file or image, you often want the name of the stream to make sense. That way, if the user tries to save the file or image, the suggested name is what you specified.

Before ending the Response stream, add something like the following:

context.Response.AddHeader("Content-Disposition", "inline;filename=" + _filename + ".png");

Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):