Search code examples
asp.netc#-4.0maskedtextboxradmaskedtextbox

Getting Literal Value from a Masked Text Box Input


I've set up a Telerik RadMaskedTextBox with a Mask of "####-####". The problem is, when I later grab the value from this box it returns as "########". I'm unfamiliar with MaskedTextBoxes but I'm guessing that this is the default way it's supposed to return my value.

How can I set the "-" as a literal character in the RadMaskedTextBox so it returns the whole value?

ex. "1234-5678" instead of "12345678"


Solution

  • Use TextWithLiterals instead of Text property.