I have a file which I generated through code on our Server. I would the user to save this new file to their computer by clicking on a button.
I have been searching for a way to do this in my code behind file or through javascript.
I have discovered the document.execCommand(….) javascript but I don’t think is this is the right direction.
Any help for a novice would be a great help!
This shouldn’t be a problem that you need fancy Javascript to solve. You should simply add a button to your page that connects to a specific url and contains an id of some sort to link it to the file that your server generated. It’s up to the server to pick the right file and serve it back to the user with the appropriate headers.