1
Answer

how to set compare validator for two text box in mvc

Ask a question

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)