prevent files from opening in the browser
Web Development
2
Posts
2
Posters
0
Views
1
Watching
-
Is there any way by which i can prevent files from opening in the browser itself. I need to force the user to save the file on the local HDD. (IIS web server). Thanks:-D Bipin
Add the http-header Content-Disposition, with at value of "attachment; filename=xxx". You can do this using asp (example using jscript): Response.AddHeader("content-disposition","attachment; filename="+TheFileName); Or you can change the content-type of the file to something the browser isn't going to recognize. This can be done in IIS Manager or asp. - Morten