views:

91

answers:

1

I would like a "Save As ..." dialog box to appear when a user clicks on a hyperlink.

I'm currently sending the HTTP headers:

application/octet-stream Content-Disposition: inline;filename=something.doc

Apparently IE users are seeing the page render inline as garbled ascii. What is the best way to force a "Save As ..." dialog box to pop up on IE?

+5  A: 

Try Content-Disposition: Attachment

Ikke
A couple additional notes: You can add ";filename=(your filename)" to give the download a default file name (useful to avoid downloads with .aspx and .php extensions". Also, ensure that you have a non-zero expiry with anything that launches a download prompt - IE has a bug that will error out on downloads for anything set to immediately expire (might be fixed in 8, was definitely present in 7).
Ryan Brunner
@Ryan: That remains true for HTTPS.
EricLaw -MSFT-