Is it possible to compare confirm password textbox\'s text with
@Html.PasswordFor(model=>model.Password)
?
@using (Html.BeginForm())
{
Just add [NotMapped]
to above of your Confirm password Property in Data Model
[NotMapped]
[Required(ErrorMessage = "Confirm Password required")]
[CompareAttribute("NewPassword", ErrorMessage = "Password doesn't match.")]
public string ConfirmPassowrd { get; set; }
By this way, it will not check ConfirmPassword
property in your DB table