From 7e57cd2d1665052fe0b726c12be47e33d54f50f8 Mon Sep 17 00:00:00 2001 From: Jason Zhu Date: Tue, 23 Nov 2021 20:34:18 +1100 Subject: [PATCH] 15.5 Using Static URL Segments; Listing 15-13. Mixing Static URL Segments and Default Values in the RouteConfig.cs File --- UrlsAndRoutes/UrlsAndRoutes/App_Start/RouteConfig.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/UrlsAndRoutes/UrlsAndRoutes/App_Start/RouteConfig.cs b/UrlsAndRoutes/UrlsAndRoutes/App_Start/RouteConfig.cs index 82428c7..4b2a14a 100644 --- a/UrlsAndRoutes/UrlsAndRoutes/App_Start/RouteConfig.cs +++ b/UrlsAndRoutes/UrlsAndRoutes/App_Start/RouteConfig.cs @@ -11,6 +11,9 @@ namespace UrlsAndRoutes { public static void RegisterRoutes(RouteCollection routes) { + routes.MapRoute("ShopSchema", "Shop/{action}", + new { controller = "Home" }); + routes.MapRoute("", "X{controller}/{action}"); routes.MapRoute("MyRoute", "{controller}/{action}",