How to Show Password As Char in TextBox in C#

  1. TextBox textBox1 = new TextBox();  
  2. textBox1.MaxLength = 8;  
  3.   
  4.  // Assign the asterisk to be the password character.  
  5. textBox1.PasswordChar = '*';  
  6.   
  7. textBox1.CharacterCasing = CharacterCasing.Lower;