Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FileInfo file = new FileInfo(filepath);
- Response.Clear();
- Response.AddHeader("Content-Disposition", "attachment; filename=" + file.Name);
- Response.AddHeader("Content-Length", file.Length.ToString());
- //Response.ContentType = "application/x-zip-compressed";
- Response.ContentType = "application/zip";
- Response.WriteFile(file.FullName);
Add Comment
Please, Sign In to add comment