By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,888 Members | 1,588 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,888 IT Pros & Developers. It's quick & easy.

MaskedTextBox input mask for 1-AA000

P: n/a
Hi,

I'm trying to define a mask for a MaskedTextBox and can't get it right. For
5 numbers, '00000' seems to be a valid mask and behaves correctly, but I
know need a control that will take a format like this: '0-AA000'
Where 0 can be anything from 0-9 and A can be any letter.

I tried '#-??###' but this mask doesn't work as the control states that it's
mask is completed after the first number is entered.

I checked MSDN but the documentation is VERy light and all the samples I've
found or only numbers.

Am I trying to make this control do something it wasn't intended for?

Thanks for reading,
Steve
Aug 14 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
sklett wrote:
Hi,

I'm trying to define a mask for a MaskedTextBox and can't get it right. For
5 numbers, '00000' seems to be a valid mask and behaves correctly, but I
know need a control that will take a format like this: '0-AA000'
Where 0 can be anything from 0-9 and A can be any letter.

I tried '#-??###' but this mask doesn't work as the control states that it's
mask is completed after the first number is entered.

I checked MSDN but the documentation is VERy light and all the samples I've
found or only numbers.

Am I trying to make this control do something it wasn't intended for?

Thanks for reading,
Steve

Try 0-??000 as # is an optional number and 0 is a required number.
Also presuming that ? is the character for A-Z.
JB
Aug 15 '06 #2

P: n/a

"John B" <jb******@yahoo.comwrote in message
news:44**********@news.iprimus.com.au...
sklett wrote:
>Hi,

I'm trying to define a mask for a MaskedTextBox and can't get it right.
For 5 numbers, '00000' seems to be a valid mask and behaves correctly,
but I know need a control that will take a format like this: '0-AA000'
Where 0 can be anything from 0-9 and A can be any letter.

I tried '#-??###' but this mask doesn't work as the control states that
it's mask is completed after the first number is entered.

I checked MSDN but the documentation is VERy light and all the samples
I've found or only numbers.

Am I trying to make this control do something it wasn't intended for?

Thanks for reading,
Steve
Try 0-??000 as # is an optional number and 0 is a required number.
Also presuming that ? is the character for A-Z.
JB
That did it, thanks for the help.
Have a good one,
Steve
Aug 15 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.