force a file to save to computer

  • Thread starter Thread starter Brian Henry
  • Start date Start date
B

Brian Henry

Is there a way or method to make a file be saved to the computer instead of
being opened on the web? we wrote a web client messaging system that uses
SSL on our server and when you open a word doc as an attachment it of course
opens in the browser... we want to force the user to save it to the computer
(at the least give them a dialog asking what they want to do with it)
instead of just opening it right to the browser... any way to do this?
thanks
 
Yes, you can force a dialog box that will ask the user whether they'd like
to open or save the file.

Response.Clear()
Response.ContentType = Whatever
Response.Writefile("c:\whatever")
Response.AddHeader("Content-Disposition",
"attachment;filename=whatever")

Here are the details:
http://steveorr.net/articles/EasyUploads.aspx
 
Back
Top