protected void btnDownloadAll_Click(object sender, EventArgs e) { string filename = PortfolioService.ExtractPersonalPhotos(GetWhereClause()); byte[] buf = FileUtils.LoadFile(filename); Response.Clear(); Response.ContentType = "application/zip"; Response.AddHeader("Content-Disposition", "attachment; filename=" + System.IO.Path.GetFileName(System.IO.Path.ChangeExtension(filename, "zip"))); Response.AddHeader("Content-Length", buf.Length.ToString()); Response.BinaryWrite(buf); Response.End(); System.IO.File.Delete(filename); }