Click here to Skip to main content
11,720,731 members (80,509 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: WPF
How to Compare two password boxes equal or not....
Posted 14-Nov-12 0:01am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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!
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

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
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 2,179
1 OriginalGriff 924
2 F-ES Sitecore 640
3 Maciej Los 609
4 Richard MacCutchan 540


Advertise | Privacy | Mobile
Web03 | 2.8.150901.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