MVC5 placeholder for input not working
My code is like this
@Html.EditorFor(model => model.CreatedUser, new { htmlAttributes = new { @class = "form-control" ,@placeholder = "Your Placeholder Text" }})
I expect the placeholder to appear as I added in the code, but it doesn't appear. Can anyone point out what I am doing wrong? HTML output
<input class="text-box single-line" id="CreatedUser" name="CreatedUser" type="text" value="" autocomplete="off" style="cursor: auto; background-attachment: scroll; background-position: 100% 50%; background-repeat: no-repeat;">
+3
source to share