In MVC project whenever we run the application we have default form to be run.
To setting up or changing up the startup view in MVC project we have entry in the Route.config file for the default view associated with the controller
For Ex:
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = "" } // Parameter default
In this example we have Home controller in which there is an index view to be invoked by default when the application gets run on the browser
We can change the controller and the view according to the user need and by default that view will be fired from the specified controller
0 Comment(s)