below is a code which new password entered and compare with the confirmed password. At run time, it doesn't show error but when input password diferent that of the confirmation, it doesn't give any matching error.
please below why the system allow me to move to the next.
Private Sub txtpwdconf_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtpwdconf.LostFocus
Dim pwdconf, password As String
Me.txtPassword.Text = Me.txtpwdconf.Text
If txtpwdconf.Text <> txtPassword.Text Then
Dim mySqlDBConnection As New SqlConnection(ConnectionString)
Dim theSqlCommand As New SqlCommand(put, mySqlDBConnection)
Dim theUsernameParam As New SqlParameter("@password", Me.txtPassword.Text)
Dim thePasswordParam As New SqlParameter("@Pwdconf", Me.txtpwdconf.Text)
Dim theReader As SqlDataReader = theSqlCommand.ExecuteReader(CommandBehavior.CloseConnection)
If theReader.HasRows Then 'we have data, user exists
MessageBox.Show("Password not Matching, Try again")
Me.txtuser_id.Clear()
Me.txtpwdconf.Clear()
txtuser_id.Focus()
End If
End If
End Sub
thanks
Gyamfi