Is there a way to have data annotation for what should be in the placeholder attr in the text box in the MVC view?
Example:
In my ViewModel.cs something like:
[Placeholder="First name"] public string FirstName { get; set; }
In my opinion:
@this.Html.TextBoxFor(m => m.FirstName)
If this can do it:
<input type="text" placeholder="First name" ... />
Is it possible? Thanks!
c # html5 asp.net-mvc viewmodel
Ian davis
source share