Html.ActionLink gives me the wrong url

Topics: Customizing Orchard, Writing modules
Aug 31, 2014 at 12:38 AM
In 1.x, I have a working route..
new RouteDescriptor {
    Priority = 25,
    Route = new Route(
        new RouteValueDictionary {{"area", "CustomModule"}, {"controller", "Foobar"}, {"action", "Item"}, {"valueOne", string.Empty}, {"valueTwo", string.Empty}},
        new RouteValueDictionary(),
        new RouteValueDictionary {{"area", "CustomModule"}},
        new MvcRouteHandler())
My problem is Html.ActionLink renders the url incorrectly and I can't figure out why.
@(Html.ActionLink("Test", "Item", new {
        area = "CustomModule",
        controller = "Foobar",
        valueOne = "foo",
        valueTwo = "bar"
Outputs: http://localhost/OrchardLocal/Admin/Foobar/foo?valueTwo=bar Yet I can manually goto: http://localhost/OrchardLocal/Admin/Foobar/foo/bar I can't figure out why. I would use a named route, but those are broken since 1.8.

Any ideas?