DotNetZip now can save directly to ASP.NET Response.OutputStream
Posted by: All About Interop,
on 04 Jun 2008 |
View original | Bookmarked: 0 time(s)
Did you ever want to zip up a file within an ASP.NET page, and then send it as a download for the requesting browser? The DotNetZip lib works within ASP.NET, and a recent update, available in the v1.5 preview release, allows you to create a zip file and save it directly to Response.OutputStream, with no intermediate file i/o, no saving the zip file to a directory on the server, no memorystreams or byte arrays to cache the content.
The code looks like this: public void btnGo_Click (Object sender,...