Home > front end >  For help, asp implementation terms pop-up page, agreed to after download code
For help, asp implementation terms pop-up page, agreed to after download code

Time:01-05

Asp page, click to download, bring up a terms of service prompt dialog box, select after agreed to continue to download, do not agree to close the prompt dialog box,
I'm confused, download link is dynamic, not an absolute path, prompt box office agreed to download how do you write the code to achieve the file download?

CodePudding user response:

Links to write anything, is the main operating when click agree to request API returned directly to download resources, configuration of the response parameters (download) is a browser directly,

CodePudding user response:

https://www.jb51.net/article/34951.htm

CodePudding user response:

Browsers can't open the file if the file is then he will automatically download, which is as long as your server does not recognize this file format and resolution to the browser so he would have to download,,,

personal understanding,,

CodePudding user response:

1. The simple method
At the time of download button click to js processing, and then use the location redirected, the disadvantage is that the user can bypass the tip to the url if you know the file,

High-end point method
2.Download, using the method of dynamic returned documents like CSDN download, users know the address is useless, because it is a dynamic verification returns,

Resources to pay the landlord if do download station recommended by the second approach,
  •  Tags:  
  • ASP
  • Related