標籤

more tags...

最新回覆

[ASP.NET]利用 DotNetZip 或 SharpZip 一次下載多個檔案

利用 DotNetZip or SharpZip 這兩個壓縮的Lib 可以將檔案壓縮起來

就像RAR那樣可以打包多個檔案為一個壓縮檔

這樣的功能,在web就可以達到一次下載多個檔案了

小弟就用一個實例來說明如何達到此功能

首先準備好要使用的DotNetZip 和 SharpZip dll,到下列網址下載

DotNetZip Url:
http://www.codeplex.com/DotNetZip

SharpZip Url:
http://www.icsharpcode.net/OpenSource/SharpZipLib/

此範例主要是先列出目錄底下所有檔案的清單,然後

1.可針對單一檔案下載(點HyperLink)

2.可勾選多個檔案,使用DotNetZip 或 SharpZip 壓縮為一個檔案輸出下載

MultiFileDownload.aspx

MultiFileDownload.aspx.cs

執行結果:


參考網址:

http://blog.miniasp.com/?tag=/dotnetzip
http://cheeso.members.winisp.net/DotNetZipHelp/Examples.htm
http://www.dotblogs.com.tw/chhuang/archive/2009/02/10/7102.aspx
http://www.dotblogs.com.tw/fatty0860/archive/2009/02/09/7084.aspx
http://richielin-programer.blogspot.com/2008/04/c-sharpzip.html
http://blog.csdn.net/cityhunter172/archive/2005/01/25/267150.aspx

推到 Twitter!
推到 Plurk!


 

2009/5/30 02:36| 閱讀數 : 3948 | 1 人收藏 我要推薦 | 4 Comments | 文章分類 : ASP.NET ASP.NET(Collections) ASP.NET(GridView) ASP.NET(IO) 訂閱


回覆

# re: [ASP.NET]利用 DotNetZip 或 SharpZip 一次下載多個檔案, Posted by bluemouse on 2009/7/11 上午 08:32  回覆

你好,看到你的文章写的很好,我最近也想在弄个压缩下载,
麻烦你把DotNetZip.dll 和 SharpZip dll 邮件发给我一份,谢谢
我的邮件:33979657@qq.com

# re: [ASP.NET]利用 DotNetZip 或 SharpZip 一次下載多個檔案, Posted by puma on 2009/7/11 上午 10:49  回覆

to bluemouse,

mail 給你了..

# re: [ASP.NET]利用 DotNetZip 或 SharpZip 一次下載多個檔案, Posted by chjiang on 2009/10/1 上午 11:22  回覆

您好,可以和您要此範例檔與dll檔案嗎?
謝謝您!!

# re: [ASP.NET]利用 DotNetZip 或 SharpZip 一次下載多個檔案, Posted by 小乐 on 2010/1/26 上午 11:31  回覆

嗯,不错,学习了。

發表回覆

標題: *
姓名: *
Email: (將不會被顯示)
Url:
回覆: *
登入後使用進階評論
Please add 3 and 7 and type the answer here:
F6 Team logo


用BloggerAds 替自已加薪

每月文章

文章分類

推薦討論區

推薦部落格