We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,608 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

How to get password from pswrd textbox which have given pswrd char???

 Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click
        Try
            Dim usr, pswd As String
            Dim i, n As Integer

            obcon.con.Open()
            obcon.cmndcon()
            obcon.cmnd.CommandText = "select count(*) from users "
            n = obcon.cmnd.ExecuteScalar
            MsgBox("n=" & n)

            For i = 1 To n Step 1
                obcon.cmnd.CommandText = "select usr_name from users where usr_id= " & i
                If obcon.cmnd.ExecuteScalar = txtusrfrmlgn.Text Then
                    usr = obcon.cmnd.ExecuteScalar
                    MsgBox(usr)

                End If
                MsgBox(i)
            Next

            For i = 1 To n Step 1
                obcon.cmnd.CommandText = "select usr_pswrd from users where usr_name='" & usr & "'"
                MsgBox(txtpswdfrmlgn.UseSystemPasswordChar)
                If txtpswdfrmlgn.UseSystemPasswordChar = True Then
                    pswd = obcon.cmnd.ExecuteScalar
                    MsgBox(pswd)
                End If

            Next

        Catch ex As Exception

            MsgBox(ex.Message)
        Finally
            obcon.con.Close()
        End Try




    End Sub
2
Contributors
1
Reply
1 Week
Discussion Span
8 Months Ago
Last Updated
2
Views
jaimin4829
Light Poster
25 posts since Dec 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

If the user has entered text into a text box, you can just simply use the TextBox.Text method.

A password character is just a way to hide the displayed text, the true text typed is still stored in the textbox's text string variable.

Begginnerdev
Practically a Posting Shark
899 posts since Apr 2010
Reputation Points: 212
Solved Threads: 149
Skill Endorsements: 9

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page generated in 0.0774 seconds using 2.69MB