protected void btnUpload_Click(object sender, EventArgs e)
{
if (fileUpload1.HasFile)
{
string fileName = Path.GetFileName(fileUpload1.PostedFile.FileName);
string fileLocation = Server.MapPath(“~/UploadedFiles/” + fileName);
fileUpload1.SaveAs(fileLocation);
ZipFile createZipFile = new ZipFile();
createZipFile.AddFile(fileLocation, string.Empty);
createZipFile.Save(Server.MapPath(“~/CsharpAspNetArticles/CsharpAspNetArticles.zip”));
}
}