Go to VS.
Create new project of type MVC Application -> Internet Application.
Then go to Models folder and look at AccountModels.
Are you see this? :
[Required]
[StringLength(100, ErrorMessage = "Value {0} must be greater length than {2} symbols.", MinimumLength = 6)]
[DataType(DataType.Password)]
[Display(Name = "New password")]
public string NewPassword { get; set; }
[DataType(DataType.Password)]
[Display(Name = "Confirm Password")]
[Compare("NewPassword", ErrorMessage = "New Password and Confirm Password are not equal.")]
public string ConfirmPassword { get; set; }
How do you like this standart attribute "
Compare"?
UPD: Sorry not properly understand you from first time.