Hi,
I noticed some odd behaviour when using the strongly typed HtmlHelper.ActionLink() extension method from ASP.NET MVC 2 Futures. When I use it to link to a controller in an area I have to use the following attribute on this controller
[ActionLinkArea("SomeArea")]
It links properly to the actions of the controller located in SomeArea from the default area. The problem is when I want to link back to a Controller action located in the default area from within SomeArea. The link appears with "/SomeArea/" prefix. The workaround I use is:
[ActionLinkArea("")]
on the controller on all controllers that are located in the default area (using inheritance).
This seems odd because in my opinion that should be the default behavior of this method. Using .NET Reflector on this extension method I noticed that the arror lies here:
return helper.RouteLink(linkText, routeValuesFromExpression, new RouteValueDictionary(htmlAttributes));
so it's actually the default behaviour of the HtmlHelper.
Have you encountered this problem - maybe there's a cleaner solution?
Best regards,
Max