471,325 Members | 1,687 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,325 software developers and data experts.

How do strip the mask character out of the mask Text box text

grs
If you do a maskTextBox.String() the mask characters are still in the
string. Surely MS does not want you to store the masking characters - where
is the method to remove the masking characters.

grs
Nov 29 '05 #1
5 10043
Hi grs,

Could you let me know what control is this? Is this a common TextBox in
windows form or in asp.net? As far as I know, the TextBox control doesn't
have the String() method. Also do you mean that you need to unmask the
character and show the plain text to the user?

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 30 '05 #2
grs
windows form masked textbox in visual studio .net 2.0

"Kevin Yu [MSFT]" <v-****@online.microsoft.com> wrote in message
news:Z4*************@TK2MSFTNGXA02.phx.gbl...
Hi grs,

Could you let me know what control is this? Is this a common TextBox in
windows form or in asp.net? As far as I know, the TextBox control doesn't
have the String() method. Also do you mean that you need to unmask the
character and show the plain text to the user?

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 30 '05 #3
Hi grs,

Do you mean that you need to exclude the mask characters such as '-' when
you're trying to get the text using maskedTextBox.Text property? If so, you
just need to set the maskedTextBox.textMaskFormat to
MaskFormat.ExcludePromptAndLiterals.

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Dec 1 '05 #4
grs
Kevin,

Got it.
mtbZipCode.TextMaskFormat = MaskFormat.ExcludePromptAndLiterals;

thanks

grs

"Kevin Yu [MSFT]" <v-****@online.microsoft.com> wrote in message
news:ry**************@TK2MSFTNGXA02.phx.gbl...
Hi grs,

Do you mean that you need to exclude the mask characters such as '-' when
you're trying to get the text using maskedTextBox.Text property? If so,
you
just need to set the maskedTextBox.textMaskFormat to
MaskFormat.ExcludePromptAndLiterals.

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Dec 1 '05 #5
You're welcome.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Dec 2 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by dude | last post: by
4 posts views Thread by Steve | last post: by
3 posts views Thread by ApexData | last post: by
4 posts views Thread by Smokey Grindle | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.