Posted By

nivlam on 06/13/11


Tagged


Versions (?)

MVC - Areas and controllers


 / Published in: C#
 

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

  1. Route mapRoute = routes.MapRoute(
  2. "Default",
  3. "{controller}/{action}/{id}",
  4. new { controller = "Home", action = "Index", id = UrlParameter.Optional },
  5. new [] { "MvcAreasWindsor.Controllers.*" }
  6. );
  7.  
  8. //mapRoute.DataTokens["Namespaces"] = new[] { "MvcAreasWindsor.Controllers.*" };
  9. mapRoute.DataTokens["UseNamespaceFallback"] = false;

Report this snippet  

You need to login to post a comment.