I\'m trying to add a class to an input.
This is not working:
@Html.EditorFor(x => x.Created, new { @class = \"date\" })
One Best way to apply class to @Html.EditorFor() in MVC3 RAzor is
@Html.EditorFor()
@Html.EditorFor(x => x.Created)
It will add above style to your EditorFor()
EditorFor()
It works for MVC3.