How can password textbox that set to :
password_txtBox.PasswordChar ="*"
to be unmasked ( from checkbox ) and then mask again
without loosing the string inside the textbox
How can password textbox that set to :
password_txtBox.PasswordChar ="*"
to be unmasked ( from checkbox ) and then mask again
without loosing the string inside the textbox
Just set the property to '\0' (which is the default value) to not mask characters.
Source: http://msdn.microsoft.com/en-us/library/system.windows.forms.textbox.passwordchar.aspx
Note: notice that '\0' is different from '0'. The first one is the null character, white '0' is the character that will be displayed as 0.
txtPassword is the Password textbox, chkSeePassword is the Show password checkbox. Now add some code to the checkbox's CheckedChanged event
One of the easiest method to show and hide password is by using radio button inside password text box
The properties of radio button should be like:
then the clicking activity has to be taken care manually just making it to be reverse of present state in its "Click" event
then finally the easiest way of show and hide password
For winforms:
If you are working with toggle switch then
here
'\0'
will show to password filed to plain textuse this one