Hey guys,
I'm trying to switch our links over to T4MVC, and I'm having a small problem with parameters that aren't part of an action's signature. We have a route that goes something like this:
http://www.mydomain.com/{fooKey}/{barKey}/{barID}
==> leads to BarController.Details(barID).
fooKey and barKey are only added to the links for SEO purposes. (since bar is a child entity of foo, and we want to represent that hierarchy in the URL)
Up until now, we would use
<% =Html.ActionLink(bar.Name, "Details", "Bar", new {barID = bar.ID, fooKey = bar.Foo.Key, barKey = bar.Key}, null)%>
And that would lead us to BarController.Details(barID), while keeping fooKey and barKey in the URL.
Now that we started with T4MVC, we tried changing it to
<% =Html.ActionLink(bar.Name, MVC.Bar.Details(bar.ID), null)%>
Since barKey and fooKey are not part of the Details action signature, they are no longer visible in the URL.
Is there a way around this without having to add these parameters to the action signature?