15.5 Using Static URL Segments; Listing 15-12. A URL Pattern with a Mixed Segment in the RouteConfig.cs File
parent
981ebcaf47
commit
2ea5c23a4d
|
@ -11,6 +11,8 @@ namespace UrlsAndRoutes
|
|||
{
|
||||
public static void RegisterRoutes(RouteCollection routes)
|
||||
{
|
||||
routes.MapRoute("", "X{controller}/{action}");
|
||||
|
||||
routes.MapRoute("MyRoute", "{controller}/{action}",
|
||||
new { controller = "Home", action = "Index" });
|
||||
|
||||
|
|
Loading…
Reference in New Issue