I have a model:
[DataType(DataType.EmailAddress)] [DisplayFormat(ConvertEmptyStringToNull = true)] [Display(Prompt = \"Email Address\")] public string Email { ge
This solved my issue:
@Html.EditorFor(model => model.Email, new { htmlAttributes = new { @class = "form-control input-sm", placeholder = @Html.DisplayNameFor(m=>m.Email) } })
The code that did it was
placeholder = @Html.DisplayNameFor(m=>m.Email)