The view or its master was not found or no view engine supports the searched locations
Posted googlegis
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了The view or its master was not found or no view engine supports the searched locations相关的知识,希望对你有一定的参考价值。
Error like:The view ‘LoginRegister‘ or its master was not found or no view engine supports the searched locations. The following locations were searched:
~/Views/MyAccount/LoginRegister.aspx
~/Views/MyAccount/LoginRegister.ascx
~/Views/Shared/LoginRegister.aspx
~/Views/Shared/LoginRegister.ascx
~/Views/MyAccount/LoginRegister.cshtml
~/Views/MyAccount/LoginRegister.vbhtml
~/Views/Shared/LoginRegister.cshtml
~/Views/Shared/LoginRegister.vbhtml
Actually my page view page is ~/Views/home/LoginRegister.cshtml
so what i do
and my RouteConfig
is
public class RouteConfig { public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "MyAccount", action = "LoginRegister", id = UrlParameter.Optional } ); } }
第一种方法:
public ActionResult LoginRegiseter()
{
return View("LoginRegiseter");
}
第二种方法:
public ActionResult LoginRegiseter()
{
return View("~/Views/MyAccount/LoginRegiseter.cshtml");
}
以上是关于The view or its master was not found or no view engine supports the searched locations的主要内容,如果未能解决你的问题,请参考以下文章
Node.js is taking over the Enterprise – whether you like it or not
Use the PDFs below or the HTML contents to the left to install and configure P6 EPPM and its additio
Consider the following: If you want an embedded database (H2, HSQL or Derby), please put it on the
Consider injecting the bean as one of its interfaces or forcing the use of CGLib-based proxies by se
UnityError The same field name is serialized multiple times in the class or its parent class. This
Only the original thread that created a view hierarchy can touch its views.