ASP.NET MVC 3 Razor – Adding class to EditorFor by IT Nursery I’m trying to add a class to an input. This is not working: @Html.EditorFor(x => x.Created, new { @class = "date" }) 16 Answers 16