小编use*_*537的帖子

未找到视图或其主视图或视图引擎不支持搜索的位置

错误如:未找到视图"LoginRegister"或其主控或没有视图引擎支持搜索的位置.搜索了以下位置:

〜/查看/我的帐户/ LoginRegister.aspx

〜/查看/我的帐户/ LoginRegister.ascx

〜/查看/共享/ LoginRegister.aspx

〜/查看/共享/ LoginRegister.ascx

〜/查看/我的帐户/ LoginRegister.cshtml

〜/查看/我的帐户/ LoginRegister.vbhtml

〜/查看/共享/ LoginRegister.cshtml

〜/查看/共享/ LoginRegister.vbhtml

实际上我的页面浏览页面就是 ~/Views/home/LoginRegister.cshtml我所做的

而我的RouteConfig

 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 }
            );
        }
    }
Run Code Online (Sandbox Code Playgroud)

asp.net-mvc-4

73
推荐指数
5
解决办法
15万
查看次数

标签 统计

asp.net-mvc-4 ×1