[ACCEPTED]-How to set the filename when downloading a file?-azure
Accepted answer
You should return a new FileContentResult 2 and your action must return FileResult instead 1 of ActionResult for ex.:
public virtual FileResult DownloadFile(long fileId)
{
string path = ExcelGenerationCode(fileName);
return File(path, "application/vnd.ms-excel","donwload.xls");
}
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.