I\'m trying to add a css class to a textbox. This is what I have in my view:
<%: Html.EditorFor(m => m.StartDate) %>
I tried follo
I was looking for a solution to apply a style to a specific box generated by the @HTML.EditorFor helper method.
The question was regarding setting a CSS class for @HTML.EditorFor but for anyone who wants to edit the style for a single element.. you can, for example, try this:
In my block, I added a style based on the ID generated by the helper: ..
and then in my page (i'm doing this in a partial view):
@Html.EditorFor(e => e.EnrollmentInfo.Format)