Jul 30

As I”ve said in one of my previous posts, you can have 2 controllers with the same name, but on different namespaces. The problem with this approach is that you”ll only be able to get a route by specifying its name. So, if you don”t want to use a name or if you can”t (for instance, if you”re using the HtmlHelper.ActionLink, which simply doesn”t let you specify a name), you”re out of luck.

Steve Sanderson extended the Route class so that you can indicate a namespace when trying to get a route by controller name from the route collection. It”s still a bit rough, but it should point you on the right direction.

1 comment so far

  1. Simone
    7:43 am - 7-31-2008

    Yep, a bit complicate, but all these extra coding sample will probably turn out in feature that the ASP.NET MVC team will include in the RTW of the framework.
    Btw: great blog… subscribed!!