Click here to Skip to main content
15,885,914 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have tried to put the re-type password on my vb.net but it need to be save it first before the validation notifies.

VB
If txtpassword.Text <> txtcpassword.Text Then
            MsgBox("Password not Match!,Please Re-type.", MsgBoxStyle.Critical)
            txtcpassword.Text = ""
            txtcpassword.Focus()
            Exit Sub
Posted

1 solution

If you are actually using VB.NET, then that won't work because MsgBox will cause a display at teh Server, not the CLient - so the user won't see it. In that case, you probably want to use Javascript to do the comparison, as it doesn't need to leave the browser until the user is happy. See here: http://keithscode.com/tutorials/javascript/3-a-simple-javascript-password-validator.html[^]

If you are using VB in a Windows application, your code above should work - so either I don't understand your question, or the problem is elsewhere in your code.
 
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