I have an ASP.NET web application. At some step I create a text file and store it in a folder on the server. I do this on the server code. But then just after getting done with creating the file I want to download that file to client computer. Is this even possible? I know about John Culviner’s jquery filedownload plugin. But after reviewing it I understood that the file to download must be in the same directory where the web site itself resides – like http://www.mywebsite.com/downloads/text1.txt. But I would like to put the created files into some other directory. I feel that ftp will come into play here but don’t exactly know how. Could you please guide me a little.
Share
What you will want is to use the Response.TransmitFile method in your backend code rather than javascript.
So once you’ve created your file simply use that code, and you will automatically (it will ask them if they want to obviously) start a file download of that file on the clients computer.