1

Hey working on a mvc project I have this link

@Html.ActionLink(item.Testers.Name, "Index", "Video", new { id = item.videoId }, null)

I want to add a css class to the action link. How can I do that?

Roi
  • 983
  • 9
  • 17

1 Answers1

1

Edit: As pointed out in comment, I made correction.

@Html.ActionLink(item.Testers.Name, "Index", "Video", new { id = item.videoId}, new { @class = "your_css_class" })

This is already answered here

Community
  • 1
  • 1
S.B
  • 43
  • 5
  • That is adding a route value, not a class attribute (and it would not even compile because it needs to be `@class`) –  May 12 '17 at 22:04