Adding Routes to MVC Application

-> If you adopt the MVC convention of implementing controllers by creating classes that derive from the ControllerBase class and giving them names that end with “Controller”, you do not need to manually add routes in an MVC application. The preconfigured routes will invoke the action methods that you implement in the controller class.

-> The following example shows the code that creates default MVC routes in the Global.asax file, as defined in the Visual Studio project template for MVC applications

Leave a Reply

Your email address will not be published. Required fields are marked *