Friday, 29 September 2017

How to set the filename when downloading a file?

public virtual FileResult DownloadFile(long fileId)
{
     string path = ExcelGenerationCode(fileName);
     return File(path, "application/vnd.ms-excel","donwload.xls");
}

No comments:

Post a Comment

Note: only a member of this blog may post a comment.

Blog Archive