Windows Phone Developers

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


Digg Technorati Delicious StumbleUpon Reddit BlinkList Furl Mixx Facebook Google Bookmark Yahoo
ma.gnolia squidoo newsvine live netscape tailrank mister-wong blogmarks slashdot spurl StumbleUpon

8 comments:

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

    ReplyDelete
  2. 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.

    ReplyDelete
  3. great. plz mail me soe more tips on email validaion in windowsform applications in C#

    ReplyDelete
  4. Set 'UseSystemPasswordChar' on True. Then you got the nice dots and not the stars

    ReplyDelete
  5. thanks alot, that what i need

    ReplyDelete
  6. It's not very secure, the password is still visible if you scan the program with Spy++.

    ReplyDelete
  7. how to do that in ASP.NET ? In ASP.NET there is no PasswordChar properties for textbox.

    ReplyDelete

kbAlertz.com :: Visual Studio 2005

kbAlertz.com :: Visual Studio 2008

kbAlertz.com :: Visual Basic 2005