For convenience, we are going to tell MVC that requests to the / URL for our application should be
directed to the Index action method of the Product controller. To do this, open the Global.asax file and
find the RegisterRoutes method. In this method, there is a call to routes.MapRoute. Change the value
assigned to the controller property from Default to Product,
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Product", action = "Index", id = UrlParameter.Optional }
)
No comments:
Post a Comment
Comments Welcome