How To: Set the filename for a handler
If you create a handler that allows your users to download/view files. When they save the file the browser attempts to save with the filename and extension of the handler.
Assuming the name of your handler was "Image.ashx" and in your handler you send an image (maybe resized) to the client. If the user attempts to save that image, it will be saved as "Image.ashx", unless you do one of the following:
Response.AddHeader("Content-Disposition", "filename=FileName.ext")
Response.AddHeader("Content-Disposition", "attachment; filename=FileName.ext")
Response.AddHeader("Content-Disposition", "inline; filename=FileName.ext")
Last Updated:Thursday, September 02, 2010By:alfero#
with your OpenID.
If you do not know what OpenID is,