7.3.3 Setting the Default Route; e.g. 7.9 Adding the Default Route

chap07
Jason Zhu 2021-08-20 22:40:30 +10:00
parent 1d1e1b3cc9
commit e43a96b58a
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ namespace SportsStore.WebUI
routes.MapRoute( routes.MapRoute(
name: "Default", name: "Default",
url: "{controller}/{action}/{id}", url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } defaults: new { controller = "Product", action = "List", id = UrlParameter.Optional }
); );
} }
} }