Guest User

Untitled

a guest
Oct 18th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. FileInfo file = new FileInfo(filepath);
  2.  
  3. Response.Clear();
  4.  
  5. Response.AddHeader("Content-Disposition", "attachment; filename=" + file.Name);
  6.  
  7. Response.AddHeader("Content-Length", file.Length.ToString());
  8.  
  9. //Response.ContentType = "application/x-zip-compressed";
  10. Response.ContentType = "application/zip";
  11. Response.WriteFile(file.FullName);
Add Comment
Please, Sign In to add comment