Reputation: 68912
In mvc how to make a URL like this:
www.example.com/SomethingElse
go to a controller named for example "UsersList" -> which should be www.example.com/List
Upvotes: 1
Views: 1521
Reputation: 1038770
You could define a route:
routes.MapRoute(
"MyRoute",
"List",
new { controller = "UsersList", action = "Index" }
);
Now when you navigate to /list
, the Index
action of the UsersList
controller will be executed.
Upvotes: 2
Reputation: 1581
Amr: I think you are looking at the routing framework. In a standard asp.net Mvc application, there is an area in the global ASAx file that you can define routes, much like you are talking about.
Upvotes: 0