Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 693
  • Last Modified:

VB.net/VBA Typing password into text box (making it invisible)

Hi

I have two text boxes  in my application that the user uses to log in
In the second password box I don't want the password to be visible but
instead I'd like dots or x's to appear.

How should do this?

Thanks
0
Murray Brown
Asked:
Murray Brown
3 Solutions
 
Imran Javed ZiaConsultant Software Engineer - .NET ArchitectCommented:
Hi,
If you are working in Winforms then you can either use textmast of textbox control or better to use PasswordBox control
Thanks
0
 
Deepak LakkadCommented:
For ASP.Net there is TextMode property for TextBox. You can use it in following way.

<asp:TextBox id="tb2" TextMode="password" runat="server" />

Open in new window


For WinForms, there is PasswordChar Property for TextBox. You can set any character in this property. The character will appear in textbox in place of your actual text.

- Deepak Lakkad
0
 
CodeCruiserCommented:
Set the PasswordChar property of Textbox to any character you want such as * or x

http://msdn.microsoft.com/en-us/library/system.windows.forms.textbox.passwordchar.aspx
0
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
thanks for the help
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now