<%@ Page Language="C#" Debug="true" %> <%@ Import Namespace="System.Text" %> <%@ Import Namespace="System.IO" %> <%@ Import Namespace="Ionic.Zip" %> <%@ Import Namespace="System.Collections.Generic" %>

Zip Files from ASP.NET

This page uses the .NET Zip library (see http://DotNetZip.codeplex.com) to dynamically create a zip archive, and then download it to the browser through Response.OutputStream, via a FileStream. This page is implemented in C#.

In some cases, saving a zip directly to Response.OutputStream can present problems for the unzipper, especially on Macintosh. To workaround that, you can save to a file, then copy the contents of the file, via a FileStream, to the Response.OutputStream.

Check the boxes to select the files, set a password if you like, then click the button to zip them up.

Password: (Optional)

Use AES?:




Nothing to see here...