1

I need to zip multiple files using a button in ASP.Net MVC3

Your answers will be very much appreciated.

Thank you!

1
  • Use a C# zip library, like this one. Alternatively, you can try this Commented Jun 1, 2012 at 14:54

1 Answer 1

1

Use the dotnetzip Library (Open source)

Simple code:

using (ZipFile zip = new ZipFile())
{
  zip.AddFile("ReadMe.txt");
  zip.AddFile("Resume.doc");
  zip.AddFile("Portrait.png");
  zip.Save("Package.zip");
}
Sign up to request clarification or add additional context in comments.

1 Comment

Hi, Thanks! this thing really zip files but how can i specify the location of the files i want to zip and a popup saying the details of the zip files and if i want to open or save,stuffs like that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.