Reputation: 9747
How can one go about doing that. I am betting it has something to do with the routing engine. Not sure though. I will continue to browse the interwebs...
Upvotes: 1
Views: 493
Reputation: 141648
You're right, you will want to change your default route. It is in the Global.asax.cs file (by default).
The default one looks like this:
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);
This line:
new { controller = "Home", action = "Index", id = UrlParameter.Optional }
Is the defaults. The default controller name is Home
and the default action is Index
. Change them to what you desire.
You can learn more about routing here.
Upvotes: 3
Reputation: 1502
Look at your default route. Out of the box, it will point to the index method of the home controller.
Upvotes: 0