Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public FileResult Download()
- {
- byte[] fileBytes = System.IO.File.ReadAllBytes(@"c:myfile.xlsx");
- string fileName = "myfile.xlsx";
- return File(fileBytes, System.Net.Mime.MediaTypeNames.Application.Octet, fileName);
- }
- byte[] fileBytes = System.IO.File.ReadAllBytes(@"c:myfile.xlsx");
Add Comment
Please, Sign In to add comment