Click here to Skip to main content
12,690,575 members (33,679 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: ASP.NET
HI All,

I am uploading local system file to server and I am storing in server's folder. I am displaying file name in gridview Now I want to download multiple file by selecting checkboxes based on that I want download files from server to local system. I am able donwload single file at a time but I want to download multiple files from server to local system.

I will be waiting for your reply.

Thanks
PBN
Posted 8-Oct-12 11:18am
PKeloor952
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

There is only one way mate, you are gonna have to zip them up on server side and then download the zip file.

You can try this SharpZipLib[^] which is an open source archiving library for C#.

Essentially, the following steps should be followed:

1) Add each item from the grid i.e. filename to a list as you check them one by one.
2) For each filename, prefix it with the base path (on your server) and using ZipLib add it to an archive file i.e. a zip.
3) finally, save zip file to the disk.
4) Redirect the client to the location of the zip file and browser will take care of the rest.

I know its not full code but you will rarely get full code on CP, unless its quite small. But this should give u an approach.
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

Check out the multiDownload jquery plugin: http://biesiad.github.com/multiDownload/[^]
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.170117.1 | Last Updated 30 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100