Return to Snippet

Revision: 47677
at June 13, 2011 23:06 by nivlam


Updated Code
Route mapRoute = routes.MapRoute(
    "Default",
    "{controller}/{action}/{id}",
    new { controller = "Home", action = "Index", id = UrlParameter.Optional },
    new [] { "MvcAreasWindsor.Controllers.*" }
);

//mapRoute.DataTokens["Namespaces"] = new[] { "MvcAreasWindsor.Controllers.*" };
mapRoute.DataTokens["UseNamespaceFallback"] = false;

Revision: 47676
at June 13, 2011 19:55 by nivlam


Initial Code
Route mapRoute = routes.MapRoute(
    "Default",
    "{controller}/{action}/{id}",
    new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);

mapRoute.DataTokens["Namespaces"] = new[] { "MvcAreasWindsor.Controllers.*" };
mapRoute.DataTokens["UseNamespaceFallback"] = false;

Initial URL


Initial Description
If we're using areas, make sure that it only looks in the root controllers directory for root controllers

Initial Title
MVC - Areas and controllers

Initial Tags


Initial Language
C#