This site uses Akismet to reduce spam. Learn how your comment data is processed. Home Web. Get daily tips in your inbox Newsletter. Leave a Reply Cancel reply Your email address will not be published.
Related Reading. It all works! Simple and easy. I must correct myself! It does not work on IE. I tested it on a virtual machine, in which no pdf reader was installed yet. In that case the file is always downloaded. This is a good solution for people who don't want to make changes to their server config. The download attribute was added in HTML5. Bird Bird 1, 7 7 silver badges 10 10 bronze badges. This needs to be done in the server side. You can't do this at the client side.
How to do it depends on the server side language in question. NET: Response. BalusC BalusC 1. For IIS: Put all files you want to force to download in their own folder. Add a new header with the following info: Name: content-disposition Value: attachment All files in that folder, when accessed, should prompt the save as dialog box for the appropriate browser.
Justin Emlay Justin Emlay 8 8 silver badges 9 9 bronze badges. Works really well and don't have to create a page specifically for forcing files to download. Jacob Relkin Jacob Relkin k 29 29 gold badges silver badges bronze badges. Alex Alex 1 1 gold badge 2 2 silver badges 11 11 bronze badges. Code Spy Code Spy 8, 4 4 gold badges 60 60 silver badges 42 42 bronze badges. Levi Hackwith Levi Hackwith 9, 15 15 gold badges 61 61 silver badges bronze badges.
MapPath strRequest ; System. FileInfo path ; if File. Clear ; Response. And then I got the usual pointless prompt about having to download the PDF. Thank you for your help. I've just going to live with this for the time being.
I'm reluctant to do any re-installation for fear of borking something in my profile too many extensions and stuff. I had hoped there was some particular setting or hack that would just get this working, but if not then I can work around it. Choose where you want to search below Search Search the Community.
Search the community and support articles Favorites, history, and downloads Microsoft Edge Search Community member. I have set FoxIt Reader to handle pdf files. I have set Edge to not open PDF files. This thread is locked. You can follow the question or vote as helpful, but you cannot reply to this thread. I have the same question 9. Report abuse.
Details required :. Cancel Submit. Previous Next. Let's work on that. This is due to the default file app that will launch automatically when you click the file. Follow the steps below to change this setting. Click Start, type Default app 2. Select Choose default apps by file type.
This will take time loading and search for the.
0コメント