views:

24

answers:

1

I have a MaskedTextBox with the PasswordChar defined so that relevant characters are not displayed raw but instead have the defined PasswordChar used instead. Just like a traditional password entry field, except I have a Mask defined so that not all the characters are turned into the PasswordChar.

I want to get the string that is actually being displayed. If I use the MaskedTextBox.Text property it gives me the raw string without substituting the PasswordChar setting. This is a problem as I want the string that has the PasswordChar values used. Any ideas?

+1  A: 
maskedTextBox1.MaskedTextProvider.ToDisplayString()
Hugh Allen
Aha, many thanks. It is so obvious when you know the answer!
Phil Wright

related questions