I need to mask Password in View in MVC Project, where i have list of users.
Model:
[Required]
[StringLength(50)]
[DataType(DataType.Password)]
[DisplayName("Password")]
public string Password { get; set; }
I have this code in View, where i see the Passwords at the moment.
@Html.DisplayFor(modelItem => item.Password)
How to Mask password in View?
EDIT:
If i try with @Html.PasswordFor(modelItem => item.Password) i see this: