Suppose I have the following route.
routes.MapRoute("SomeRouteName"
, "{node}/{action}/{destination}"
, new { Controller = "Document"}
, new { Action = "Transfer|Destine|Remove" }
);
When "/X/Destine/Y" URL is entered, the "Destine" action fires and renders a view, which contains the following:
<%= Url.Action("Transfer") %>
I expect it would produce "/X/Transfer/Y" URL. Instead, it returns empty string.
Interesting to note, that changing route's url pattern to
routes.MapRoute("SomeRouteName"
, "{node}/{destination}/{action}"
, new { Controller = "Document"}
, new { Action = "Transfer|Destine|Remove" }
);
makes things working fine. However, I need the former url pattern.
The question: where is {destination} route value lost?
Edited on 31th of January 2010, removed MvcContrib syntax.