Hi All,
I'm using following code to get the controller/action information from RouteData
RouteData route = RouteTable.Routes.GetRouteData(httpContext);
string controller = route.GetRequiredString("controller");
string action = route.GetRequiredString("action");
But should I change the string "controller" in case that the route map in Global.asax.cs does not have a part with "controller" as follows:
routes.MapRoute(
"Default", // Route name
"{NOTCONTROLLER}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = "" } // Parameter defaults
);
Thanks!