using (ZipFile zip = new ZipFile()) { string fileName = "file_1_13_08_2020.txt"; string filePath = Server.MapPath("~/User/JSON_Audit/" + fileName); zip.AddFile(filePath, "JSON Files"); Response.Clear(); Response.AddHeader("Content-Disposition", "attachment; filename=DownloadedFile.zip"); Response.ContentType = "application/zip"; zip.Save(Response.OutputStream); Response.End(); }
string[] files = Directory.GetFiles(Server.MapPath("~User\JSON_Audit"), "file_1*");
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)