i have a file list with check box for each files , if the user checks many files and click download i have to zip all those files and download it... like in mails attachments..
i have used the code mention in this post for single file download
pls help how to download multiple files as zip..
Create a ZIP file on the fly using http://www.icsharpcode.net/opensource/sharpziplib/.
This is how to do it the DotNetZip way :D I vouch for DotNetZip because I have used it and it is by far the easiest compression library for C# I've come across :)
Check http://dotnetzip.codeplex.com/
http://dotnetzip.codeplex.com/wikipage?title=CS-Examples&referringTitle=Examples
Create a downloadable zip within ASP.NET. This example creates a zip dynamically within an ASP.NET postback method, then downloads that zipfile to the requesting browser through Response.OutputStream. No zip archive is ever created on disk.
You need to pack files and write a result to a response. You can use SharpZipLib compression library.
Code example:
The 3 libraries I know of are SharpZipLib (versatile formats), DotNetZip (everything ZIP), and ZipStorer (small and compact). No links, but they are all on codeplex and found via google. The licenses and exact features vary.
Happy coding.