When trying to use this
@Html.DisplayFor(m => m.someField, new { htmlAttributes = "class = someclass" })
field when rendered does not contain someclass class. I assumed that this is because it just writes the text, and there is no span element or anything else to include the class.
I really want to set the id to update it via js later.
source share