"eljainc" <el*****@sbcglobal.netwrote in message
news:59**********************************@c65g2000 hsa.googlegroups.com...
Hello,
I am trying to utilize a MaskedTextBox control on my form. I would
like the user to enter numbers only (i.e. 65000), I set the Mask
property as 999999 and the PromptChar as space (it won't take a
blank). However in my output the masked characters are replaced by
spaces. How can I change this promptchar to a blank/empty value so
that there are no spaces? Is there a more suitable control to use?
You can't use the MaskedTextBox.Text.Trim() or some other string
manipulation method for the control? You can even make-up a method like a
String method named RemoveSpacesMTB( ref MaskedTextBox ctrl), give the
method the MaskedTextBox control, do string manipulation that way too off of
ctrl.text.whateverstringmethod(), and return the manipulated string to the
control.