How to make password entered in textbox safe?

qadeer37

Well-known member
Joined
May 1, 2010
Messages
63
Location
Hyderabad,pakistan
Programming Experience
1-3
I have two textbox Controls

txtbox1 with useSystemPasswordChar property on

txtbox2

Private Sub btn1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn1.Click

txtBox2.Text = txtBox1.Text

End Sub

after this subroutine the text entered in txtbox1 is shown in txtbox2 but I want txtbox1.text to be secure so that on other control can access the text. what should I do?
 
Maybe something like that:

VB.NET:
Public Class ProtectedPassWordTextBox
inherits Textbox

Public Shadows Property Text() as string
  Protected Get
            Return mybase.text
  End Get
 Set (value as string)
           mybase.text=value
 End Set
End Property

End Class

This way, it is a "WriteOnly" Property except for inherited classes (and itself)
 
Back
Top