However this gives me an error unless I add null for the routevalues before the html attributes. I can't figure out why this is so. Could this be a mvc version issue or perhaps I'm referencing the wrong dll somewhere ?
Please assist. I was following the Sportsstore example application by Adam Freeman(Apress) and his code doesn't have the null for routevalues and apparently works.
public static MvcHtmlString ActionLink(
this HtmlHelper htmlHelper,
You are trying to pass an anonymous object of htmlAttributes. To match the signature your routeValues needs to contain a value (null in this case). There is no overload with three strings and one object as a parameter, therefore you get an error.
Asked in February 2016Viewed 2,773 timesVoted 8Answered 1 times