在MVC应用程序文件下载 [英] File download in MVC application
本文介绍了在MVC应用程序文件下载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何设置它,这样当单击视图链接,它会提示用户下载文件。
How do I set it so that when a link is clicked in a view, it prompts the user to download a file.
推荐答案
您可以只返回一个FileResultType。 http://msdn.microsoft.com/en-us /library/system.web.mvc.fileresult.aspx
You can just return a FileResultType. http://msdn.microsoft.com/en-us/library/system.web.mvc.fileresult.aspx
这篇关于在MVC应用程序文件下载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文