0

How can I include parameters and class name in @Html.ActionLink

@Html.ActionLink(item.Name, item.ActionName, item.ControllerName, new  
RouteValueDictionary(item.Parameters), new Dictionary<string, object>{{"class",item.ClassName}}))

Error I get is: Ambiguous invocation: void Write(object)(in class _

The above doesn't work. Thanks.

tereško
  • 58,060
  • 25
  • 98
  • 150
user2893547
  • 135
  • 1
  • 9
  • Please provide your non working code. :) – Justin Russo Nov 19 '13 at 16:12
  • This is my nonworking code: @Html.ActionLink(item.Name, item.ActionName, item.ControllerName, new RouteValueDictionary(item.Parameters), new Dictionary{{"class",item.ClassName}})) – user2893547 Nov 19 '13 at 16:26
  • I think this is what you are after. http://stackoverflow.com/questions/5907530/can-i-add-a-class-to-an-html-actionlink-in-mvc3 – ToddB Nov 19 '13 at 19:01

0 Answers0