The overload you are using makes the year
value end up in the html attributes of the link (check your rendered source).
The overload signature looks like this:
MvcHtmlString HtmlHelper.ActionLink(
string linkText,
string actionName,
string controllerName,
object routeValues,
object htmlAttributes
)
You need to put both your route values in to the RouteValues
dictionary like this:
Html.ActionLink(
"View Details",
"Details",
"Performances",
new { name = item.show, year = item.year },
null
)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…