更改主页无效

时间:2016-01-20 08:08:25

标签: asp.net-mvc asp.net-mvc-3 mvcroutehandler

在我的项目中,初始路由配置如下所示

 public static void RegisterRoutes(RouteCollection routes)
  {
   routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
   routes.MapRoute(
   name: "Default",
  url: "{controller}/{action}/{id}",
 defaults: new { controller = "Home", action = "Login", id = UrlParameter.Optional }
            );
        }

现在我改为

 public static void RegisterRoutes(RouteCollection routes)
  {
   routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
   routes.MapRoute(
   name: "Default",
  url: "{controller}/{action}/{id}",
 defaults: new { controller = "Pro123", action = "Index", id = UrlParameter.Optional }
            );
        }

然后我重建解决方案并再次运行@本地系统。它仍然是Home控制器的登录视图。我错过了什么吗?

0 个答案:

没有答案