Posted on: 8/30/2013 12:41:33 AM | Views : 306

I have a gridview with the path to different files in different directorys listed.  I would like to have a download all button that downloads all the files into one zip file.  I found code to download all from the same folder and tried to modify it for my need but haven't been able to figure it out.  Here is my code.  Any help would be appreciated.
protected void btnDownloadAll_Click(object sender, EventArgs e) {
using (ZipFile zip = new ZipFile()) { zip.AlternateEncodingUsage = ZipOption.AsNecessary; //zip.AddDirectoryByName("Files"); foreach (GridViewRow row in GridView1.Rows) { string fileDirectory = (row.FindControl("UserName") as Label).Text; string filePath = (row.FindControl("MediaURL") as Label).Text;
zip.AddDirectoryByName("fileDirectory");
zip.AddFile(filePath, "fileDirectory");
//if ((row.FindControl("chkSele ...

Go to the complete details ...