Click here to Skip to main content
11,496,146 members (1,702 online)
The site is currently in read-only mode for maintenance. Posting of new items will be available again shortly.
See more: WPF
How to Compare two password boxes equal or not....
Posted 14-Nov-12 1:01am
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!
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[^].

if (pass1.Password != pass2.Password)
                   MessageBox.Show("Passwords Not Matching.....","Confirmation");

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

  Print Answers RSS
0 Dnyaneshwar@Pune 692
1 CHill60 248
2 RyanDev 230
3 Sascha Lefèvre 205
4 OriginalGriff 155
0 Sergey Alexandrovich Kryukov 10,372
1 OriginalGriff 8,871
2 Sascha Lefèvre 3,899
3 Maciej Los 3,422
4 Richard Deeming 2,600

Advertise | Privacy | Mobile
Web04 | 2.8.150520.1 | Last Updated 4 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100