ASP.NET(vb.net) & Zip Add Multiple file - This article how to example scripts ASP.NET Add Multiple fileĀ to Zip.
ShotDev Focus:
- ASP.NET(vb.net) & Zip Add Multiple file
Example
AspNetMultiZipFile.aspx
<%@ Import Namespace="ICSharpCode.SharpZipLib.Zip"%> <%@ Page Language="VB" %> <script runat="server"> Sub Page_Load(sender As Object, e As EventArgs) Dim MyZip As ZipFile MyZip = ZipFile.Create(Server.MapPath("MyZip/shotdev.zip")) With MyZip .BeginUpdate() .Add(Server.MapPath("myfiles1.txt"), "myfiles1.txt") .Add(Server.MapPath("myfiles2.txt"), "myfiles2.txt") .Add(Server.MapPath("myfiles3.txt"), "myfiles3.txt") .Add(Server.MapPath("myfiles4.txt"), "myfiles4.txt") .CommitUpdate() End With MyZip.Close() Me.lblText.Text = "Zip Created <a href=MyZip/shotdev.zip>Click here</a> to Download" End Sub </script> <html> <head> <title>ShotDev.Com Tutorial</title> </head> <body> <form runat="server"> <asp:Label id="lblText" runat="server"></asp:Label><br /> </form> </body> </html>
Screenshot