Hi
You can use Ionic.Zip dll for this
use below code to make your solution
Imports Ionic.Zip
use below code on Download button click
Using zip As New ZipFile()
For i As Integer = 0 To lbFilesDetails.Items.Count - 1
If lbFilesDetails.Items(i).Selected = True Then
zip.AddFile(lbFilesDetails.Items(i).Value.ToString())
End If
Next
If zip.Count > 0 Then
Response.Clear()
Response.BufferOutput = False
Dim zipName As String = [String].Format("Zip_{0}.zip", txtXXXNum.Text)
Response.ContentType = "application/zip"
Response.AddHeader("content-disposition", "attachment; filename=" + zipName)
zip.Save(Response.OutputStream)
Response.[End]()
Else
ScriptManager.RegisterStartupScript(Me, [GetType](), "showalert", "alert('No File(s) Selected or Exists.');", True)
End If
End Using