AspNetIntro2016.RouteConfig.RegisterRoutes C# (CSharp) Метод

RegisterRoutes() публичный статический Метод

public static RegisterRoutes ( RouteCollection routes ) : void
routes RouteCollection
Результат void
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
                        
            routes.MapRoute(
                name: "Calendar",
                url: "Calendar/{year}/{month}",
                defaults: new { controller = "Calendar", action = "Index", year = UrlParameter.Optional, month = UrlParameter.Optional }
            );

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
            );
        }
    }
RouteConfig