如何在链接上打开html文件 [英] how to open html file on link
本文介绍了如何在链接上打开html文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想打开.html文件,该文件存储在应用程序的一个文件夹中点击链接..页面的路径来自数据库..我有以下但不工作
//代码
i want to open .html file which is stored in application's one folder on click of link..and path of page is coming from database.. i have following but not working
//code
public ActionResult Video(int id)
{
var path =文件的路径,例如file / html / index。 html
返回文件(路径,text / html);
}
var path=path of file e.g file/html/index.html
return File(path, "text/html");
}
推荐答案
查看此链接。
http://stackoverflow.com/questions/5826649/returning-a-file-to-view-download-in-mvc [ ^ ]
这篇关于如何在链接上打开html文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文