#region 将文件压缩成zip形式
fujian = "newZip" + table.Rows[0][0].ToString() + ".zip";
ZipFile(Server.MapPath("TemporaryImage/"), "D://iis folder//web//files//ExpressZIP//" + fujian);
#endregion
//添加成压缩文件
private void ZipFile(string zipDir, string zipFile)
{
try
{
ICSharpCode.SharpZipLib.Zip.FastZip fz = new ICSharpCode.SharpZipLib.Zip.FastZip();
fz.CreateZip(zipFile, zipDir, true, "");
}
catch
{
}
}
需添加 ICSharpCode.SharpZipLib.dll 文件