Im using routes.add instead of routes.maproute (which has a namespace arg)
because I extended the Route Class.
I need to add namespace on the routes because one of my Areas has the same controller name
within the site.
My problem is I dont know where to put the namespace..
public class CultureRoute : Route
{
public CultureRoute(string url, object defaults, object constraints, RouteValueDictionary dataTokens)
: base(url, new RouteValueDictionary(constraints), dataTokens, new MvcRouteHandler())
{
}
}
Global.asax
routes.Add("Default", new CultureRoute(
"{controller}/{action}/{id}",
new {controller = "Home", action = "Index", id = UrlParameter.Optional}));
1 Answer