How do I confuse password entry on a form using vb.net?

I am not sure how to obfuscate the input in the form when accepting the password input using vb.net. Instead of repeating the password, I just want an echo asterisk, for example:

Actual password entry:

sword

What the user sees:

*********

How to do it?

+3
source share
3 answers

Set the PasswordChartext box property to the * character, for example.

textBox.PasswordChar = "*"c
+9
source

The problem with typpo and jon's answer is that entering a text field based on a property PasswordCharis that it is unsafe! Select the text disguised as asterisks, copy it to the clipboard and paste into it, for example, a notepad, the password is revealed!

, , , ,

VC, , , , , . #, , , / , .

  • , .
  • .

, , , , .

+6

In VB form? I think that you set the PasswordChar property to a character, it will display password characters.

If in a web form, set a password for textbox.textmode.

0
source

Source: https://habr.com/ru/post/1726599/


All Articles