ASP Dotnet MVC Routing
Routing In ASP Dotnet MVC
ASP .NET MVC routing has an important role in ASP .NET MVC .Basically, it maps request URL to a specific controller action using a Routing Table.Here first we just run the project, there is no resources is found.
If we given the correct path only, the created view is shown otherwise the result is just like in previous figure.Here we are specifying the path. The result is shown.
Routing MechanismAnother fact is that we can specify the path earlier,then there is no need to manually specify the path.It automatically routes and display the result.This can be done in RouteConfig.cs in the App_start.
Like in code, we can alter the controller and action name by our necessity.It automatically routes and search the controller and action that is speicified.
Then we can run the code and see the resultant window with output.No need to specify the path explicity.This is what we say called routing.