This project has moved and is read-only. For the latest updates, please go here.

Currency mask with the MaskedTextBox

Dec 6, 2011 at 1:28 PM

I have had no problem using the control for SSN and other fixed format fields.  I tried to use it for a currency based field and it an issue.  What mask do you use for currency that allows the comma (thousands separator) to move?  I tried "$#,###.00" and it was fixed to the length.  I also tried "9" and "0" and that didn't work.  Thanks.

Dec 6, 2011 at 2:41 PM

The MaskedTextBox is not a variable length input control.  If you need variable length I suggest using the DecimalUpDown or DoubleUpDown control and apply a C2 FormatString.

Dec 6, 2011 at 3:38 PM

That did it.  Thanks for the help and the very quick reply.