Click here to Skip to main content
15,891,849 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to Compare two password boxes equal or not....
Posted

If ur writing code in ASP.NET then use validation controls i.e., compare validator.In that use Control to control validator.

set properties as:
Control to validate:textBox1
Control to compare:textBox2
error message:Password doesn't matched!
 
Share this answer
 
The whole idea to compare passwords is wrong. In a secure systems, passwords are not stored anywhere, and it is absolutely not needed for authentication.

Cannot agree with that? Surprised? Nevertheless, it's true. Please see my past answers:
storing password value int sql server with secure way[^],
Decryption of Encrypted Password[^],
i already encrypt my password but when i log in it gives me an error. how can decrypte it[^],
TCP Connection with username and password[^].

—SA
 
Share this answer
 
C#
if (pass1.Password != pass2.Password)
               {
                   MessageBox.Show("Passwords Not Matching.....","Confirmation");
               }
 
Share this answer
 

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