Naming your actions is up to you. But you have to set up routing accordingly.
Read this article:
http://www.asp.net/mvc/tutorials/older-versions/controllers-and-routing/asp-net-mvc-routing-overview-cs[
^]
As you will see, there is a default route mapping:
routes.MapRoute(
"Default",
"{controller}/{action}/{id}",
new { controller = "Home", action = "Index", id = "" }
);
So if you don't specify an action name it will use
Index
. This is what you need to change in addition to renaming the action method. And of course, you need also to have proper views prepared (*.cshtml).
So let's say you want
startpage
instead of
index
. You need to do followings:
1) change the default route from index to startpage
2) rename index method to startpage in the controller
3) rename index.cshtml to startpage.cshtml
If you start with bare application, you need only step 1, and proceed with the actions.