阅读背景:

Asp.net MVC FileContentResult—阻止在浏览器中打开

来源:互联网 

One of my controller actions returns a file to the user. I would like the user to be presented with the download (open/save) dialog, regardless of the file type. This works fine when the file type is .doc, .docx, .xlsx, etc.., but when the file is .txt, .xps, .pdf (sometimes), or .html, it opens in the browser.One of my controller actions returns a file to




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: