jothi kumar

jothi kumar

  • 1.6k
  • 107
  • 55.9k

how to set compare validator for two text box in mvc

Aug 2 2014 1:54 AM

hi to all,
Here i doing register module. i want how to compare password.IN Model i have only Password Field only in model.If i click Add button for new register i want to compare Password and conform password.
 
DESCRIPTION:
Here my model
 
[Required(ErrorMessage = "Password is required.")]
        [StringLength(12)]
        [Column(TypeName = "char")]
        public string Password { get; set; }

above model have only password field
 

IN VIEW :-
If i click add new button i want password and conform password. how to compare in views this two textbox.how i write view


Answers (1)