- PDF下载:return File(_pdfFilePath, "text/plain", Url.Encode(downName));
- Excel下载:return File(ms, "application/ms-excel", Url.Encode(downName));
- Word下载:return File(ms, "application/ms-word", Url.Encode(downName));
(说明:_pdfFilePath表示文件路径,downName表示下载文件名称;ms = new MemoryStream();)
WGavin 发布了17 篇原创文章 · 获赞 1 · 访问量 1万+ 私信 关注