![](/img/trans.png)
[英]calling controller action method from the view using $.getJSON(url)
[英]Calling View by using absolute path from Controller Action Method
我正在使用Asp.Net MVC4。我的HomeController在我的根Controller文件夹中。 我的视图在另一个文件夹中(〜/ Folder1 / FolderB / View1.cshtml)
我如何从HomeController访问我的视图。
检查以下解决方案:
public ActionResult TestAction()
{
// You can access any folder view
return View("~/Folder1/FolderB/View1.cshtml");
}
希望这会有所帮助!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.