Reputation: 3316
I have some scenario in my application where i need to give multiple download functionality. As much i come to know that multiple download is not possible using HTTP.Either we have to use multiple popup with javascript or we can do using web client.
I want to know that is there any other way to this. Can we use FTP for multiple download in asp.net? if yes, then how?
Upvotes: 0
Views: 2969
Reputation: 1149
Check out this JQuery plug-in that does most of the work for you (and doesn't require you to ZIP all files): https://github.com/biesiad/jquery-multidownload/ (fixed link)
Upvotes: 1
Reputation: 12175
Most modern websites solve this problem by sending you the collection of files in a zipped package, sites like Google Drive for example. This is a perfect solution especially if you are expecting a large number of files.
However, if you expect a relatively low fixed number of files, and these files are statically stored in the server (meaning not generated at run-time), you can develop a client-side ajax script (jquery presumably) that will download the files one by one.
Initially this script would request a list of files to download (in json format for example), once received then it will enumerate through the result, firing an asynchronous request for the file one by one.
Upvotes: 0
Reputation: 3523
I would be tempted to zip the files on the server and send them down that way. Is that possible?
Alternatively you could try emailing the files to them.
Via HTTP you would probably need to use AJAX or iframes. The iframe option would be akin to making new windows just the user wouldnt need to see them. In this way you would have multiple http requests. I'm not sure how all of the browsers would deal with this though at the minute I am just speculating.
Upvotes: 0
Reputation: 2737
No you can't use FTP in ASP.NET, however you could add all files to a single zip-file and let the user download that file (containing all files).
Upvotes: 0