Click here to Skip to main content
15,895,557 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
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

C#
[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
Posted
Comments
Sergey Alexandrovich Kryukov 2-Aug-14 2:19am    
The whole idea of storing passwords anywhere and comparing them, ever, is too bad to discuss it. This would be utterly unsafe. Passwords should be used on the form of cryptographic hash functions only, but this excludes the idea of comparing two controls. :-)
—SA

1 solution

Please see my comment to the question: the whole idea is bad. For further explanation, please see my past answers:
i already encrypt my password but when i log in it gives me an error. how can decrypte it[^],
Decryption of Encrypted Password[^],
storing password value int sql server with secure way[^].

—SA
 
Share this answer
 
Comments
JOTHI KUMAR Member 10918227 2-Aug-14 2:47am    
i just do final year project so above i cant understand bcz i'm new for mvc so kindly help me
Sergey Alexandrovich Kryukov 2-Aug-14 20:16pm    
Help with what? Sorry, but you did not write anything constructive in response, did not explain what you failed to understand. How can I be sure that my further help won't be wasted?
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900