Guest User

Untitled

a guest
Sep 18th, 2018
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. public FileResult Download()
  2. {
  3. byte[] fileBytes = System.IO.File.ReadAllBytes(@"c:myfile.xlsx");
  4. string fileName = "myfile.xlsx";
  5. return File(fileBytes, System.Net.Mime.MediaTypeNames.Application.Octet, fileName);
  6. }
  7.  
  8. byte[] fileBytes = System.IO.File.ReadAllBytes(@"c:myfile.xlsx");
Add Comment
Please, Sign In to add comment