diff --git a/UrlsAndRoutes/UrlsAndRoutes/App_Start/RouteConfig.cs b/UrlsAndRoutes/UrlsAndRoutes/App_Start/RouteConfig.cs index cae7fce..6fe3aa0 100644 --- a/UrlsAndRoutes/UrlsAndRoutes/App_Start/RouteConfig.cs +++ b/UrlsAndRoutes/UrlsAndRoutes/App_Start/RouteConfig.cs @@ -12,7 +12,7 @@ namespace UrlsAndRoutes public static void RegisterRoutes(RouteCollection routes) { routes.MapRoute("MyRoute", "{controller}/{action}/{id}", - new { controller = "Home", action = "Index", id = "DefaultId" }); + new { controller = "Home", action = "Index", id = UrlParameter.Optional}); } } }