MaskEditControl

  • Thread starter Thread starter inadsad
  • Start date Start date
I

inadsad

Good Day Group,

I have a MaskEdit control to show phone in (###)###-####. I'm
trying to extract number only from the maskedit
control. For example, maskedit shows this (123) 456-7890 and would
like to get only 1234567890 with out the space and chars. I tried
substring and would like to know is there any other function in
vb.net? Thanks in advance.

Ian
 
Dim s As String = "(123)456-7890"
MsgBox(s.Remove(8, 1).Remove(4, 1).Remove(0, 1))

hah~
 
Change the TextMaskFormat property to ExcludePromptAndLiterals

MaskedTextBox1.TextMaskFormat = MaskFormat.ExcludePromptAndLiterals

Thanks, Rob
 
Back
Top