what is route config in mvc
In ASP.NET MVC, route configuration is the process of defining route templates and registering them with the routing system. This usually happens during application startup, in the RouteConfig.cs file within the App_Start folder.
In MVC, routing is a process of mapping the browser request to the controller action and return response back. Each MVC application has default routing for the default HomeController. We can set custom routing for newly created controller. The RouteConfig. cs file is used to set routing for the application.
what is Route in MVC
Route defines the URL pattern and handler information. All the configured routes of an application stored in RouteTable and will be used by the Routing engine to determine appropriate handler class or file for an incoming request.
Where is RouteConfig in MVC?
Every MVC application must configure (register) at least one route configured by the MVC framework by default. You can register a route in RouteConfig class, which is in RouteConfig. cs under App_Start folder. The following figure illustrates how to configure a route in the RouteConfig class .
No comments:
Post a Comment