How to show text as hidden using C #
I am developing in C #. I need to write down the password written inside a textbox, but would not like to show the entered password, specifying **** or any other character instead to hide the password.
How can i do this? I'm pretty sure that by changing the attribute, but can't find which one: - (
Thank!
+1
source to share
4 answers
To use your own character: http://msdn.microsoft.com/en-us/library/system.windows.forms.textbox.passwordchar.aspx
To use the system default symbol: http://msdn.microsoft.com/en-us/library/system.windows.forms.textbox.usesystempasswordchar.aspx
textBox1.UseSystemPasswordChar = true;
//or
textBox1.PasswordChar = '%';
0
source to share