To download the entire directory, a general method is a man download or FTP tool now with Sharpziplib to implement a real-time zip compression to download the entire directory.
Sharpziplib provides a wide range of compression algorithms, pure CSHARP code, see http://www.icsharpcode.net/opensource/sharpziplib/default.asp
The principle is to compress each file to zipoutputstream by recursive methods, and then download
Codes and examples are as follows:
<% @ Import namespace = "ICSharpCode.SharpZipLib.Zip"%> <% @ Import Namespace = "System.IO"%>