T4MVC and current route values when creating links

Sep 14, 2012 at 10:41 PM

I'm currently running into a problem which is outlined here:

http://stackoverflow.com/questions/780643/asp-net-mvc-html-actionlink-keeping-route-value-i-dont-want

The workaround suggested is to explicitly pass string.empty to a route value that you don't want carried along, this doesn't work with ActionLink(this HtmlHelper htmlHelper, string linkText, ActionResult result).  Any idea how to get around it?

Coordinator
Sep 17, 2012 at 10:43 PM

I think you should be able to use the same workaround using the T4MVC AddRouteValue method. See doc for details.