Saturday, June 13, 2009

How to mask the Password text in Textboxes (in VB.NET / C#)

It is simple to mask the characters entered in a textbox by setting the PasswordChar Property

The same can be done using C# code as shown below:

TextBox2.PasswordChar = "*"



Text Box without Mask
PasswordChar Property in TextBox

Masked Textbox


2 comments:

Tweaks 4 Pc said...

Nice tip. I'll have to try it out. Will help to improve security on some apps I would think. Thanks!

Anonymous said...

It is rather interesting for me to read the post. Thanks for it. I like such themes and everything that is connected to them. I would like to read a bit more soon.

kbAlertz.com :: Visual Studio 2005

kbAlertz.com :: Visual Studio 2008

kbAlertz.com :: Visual Basic 2005