How to change default action method inside the ActionInvokeMethod of ControllerActionInvoker class?
+2
A:
This is not controlled in that function. This comes from your RouteTable.
For example:
routeCollection.MapRoute(null, "{controller}/{action}/{id}", new {action = "Index", id = (string) null}, new {controller = @"[^\.]*"});
Note there that the anonymous object has action = "Index"
This tells the routing engine that if action does not exist, set it's value to "Index".
This is probably the very route you want to modify in your RouteTable. If I changed this in my app to "SomeOtherAction" that would be the default action that would fire.
Hope this helps...
CubanX
2009-04-10 13:37:35
This call is found in your Global.asax in the RegisterRoutes method!
Danny Tuppeny
2009-04-10 14:55:27