Set the class attribute to Html.EditorFor in ASP.NET MVC Razor View December 18, 2023 by Tarik Try this: @Html.EditorFor(model => model.Title, new { htmlAttributes = new { @class = "form-control" } })