MaskedTextBox
Wisej.Web.MaskedTextBox
Last updated
Was this helpful?
Wisej.Web.MaskedTextBox
Last updated
Was this helpful?
Namespace: Wisej.Web
Assembly: Wisej.Framework (2.5.0.0)
Uses a mask to distinguish between proper and improper user input.
The MaskedTextBox class is an enhanced control that supports a declarative syntax for accepting or rejecting user input. Using the property, you can enforce the following input types without writing any custom validation logic in your application:
Required input characters.
Optional input characters.
The type of input expected at a given position in the mask; for example, a digit, or an alphabetic or alphanumeric character.
Mask literals, or characters that should appear directly in the MaskedTextBox; for example, the hyphens(-) in a phone number, or the currency symbol in a price.
Special processing for input characters; for example, to convert alphabetic characters to uppercase.
Special processing for input characters; for example, to convert alphabetic characters to uppercase.
When a control is displayed at run time, it represents the mask as a series of prompt characters and optional literal characters. Each editable mask position, representing a required or optional input, is shown with a single prompt character. For example, the number sign (#) is often used as a placeholder for a numeric character input. You can use the property to specify a custom prompt character. The property determines if the user sees the prompt characters when the control loses input focus
mask
Throws:
Masking Character Description 0 Digit, required. This element will accept any single digit between 0 and 9. 9 Digit or space, optional.
Digit or space, optional. If this position is blank in the mask, it will be rendered as a space in the Text property. Plus (+) and minus (-) signs are allowed. L Letter, required. Restricts input to the ASCII letters a-z and A-Z. This mask element is equivalent to [a-zA-Z] in regular expressions. ? Letter, optional. Restricts input to the ASCII letters a-z and A-Z. This mask element is equivalent to [a-zA-Z]? in regular expressions. & Character, required. This element behaves like the "L" element. C Character, optional. Any non-control character. This element behaves like the "?" element. A Alphanumeric, required. The only characters it will accept are the ASCII letters a-z and A-Z. This mask element behaves like the "a" element. a Alphanumeric, optional. The only characters it will accept are the ASCII letters a-z and A-Z. This mask element behaves like the "A" element. . Decimal placeholder. The actual display character used will be the decimal symbol appropriate to the format provider, as determined by the control's FormatProvider property. , Thousands placeholder. The actual display character used will be the thousands placeholder appropriate to the format provider, as determined by the control's FormatProvider property. : Time separator. The actual display character used will be the time symbol appropriate to the format provider, as determined by the control's FormatProvider property. / Date separator. The actual display character used will be the date symbol appropriate to the format provider, as determined by the control's FormatProvider property. $ Currency symbol. The actual character displayed will be the currency symbol appropriate to the format provider, as determined by the control's FormatProvider property. < Shift down. Converts all characters that follow to lowercase.
This property only enables/disables the password mode for the textbox. It doesn't change the password masking character used by the browser.
Throws:
Converts the user input string to an instance of the validating type.
Throws:
Bindable components implement this interface.
All wisej components implement this interface.
Allows an object to serialize itself.
Initializes a new instance of the class using defaults.
Initializes a new instance of the class using the specified input mask.
A representing the input mask.
mask is null.
: Returns or sets whether the control modifies the case of characters as they are typed.
: Returns or sets the culture information associated with the masked text box.
: Returns or sets whether the prompt characters in the input mask are hidden when the masked text box loses focus.
: Specifies the type, min, max and step properties to associate to the element.
: Returns or sets the input mask.
The is a string that defines the masking characters and the literals to display and process during user input and when reading the property. Server side masking is processed by an instance of the class exposed by the property. On the client side, the mask processing is performed by the "wisej.utils.MaskProvider.js" class while the user edits the input field.
Shift up. Converts all characters that follow to uppercase. | Disable a previous shift up or shift down. Escape. Escapes a mask character, turning it into a literal. "\" is the escape sequence for a backslash. Others Literals. All non-mask elements will appear as themselves within MaskedTextBox. Literals always occupy a static position in the mask at run time, and cannot be moved or deleted by the user. If you change the when the control already contains a value, it will apply the new mask to the existing text. The decimal (.), thousand (,), time (:), date (/), and currency ($) symbols default to displaying those symbols as defined by the application's culture. You can force a specific to display symbols for another culture by using the property. Otherwise you can set the application-wide culture by setting the property.
: Returns the mask provider associated with this instance of the masked text box control.
: Returns or sets the character used to mask characters of a password in a single-line control.
: Returns or sets the character used to represent the absence of user input in the control.
The character specified when setting this property is not a valid prompt character.
: Returns or sets whether the parsing of input text should stop after the first invalid character is reached.
: Returns or sets whether the text in the is spell checked by the browser.
: Returns or sets the current text in the text box.
: Returns or sets how text is aligned in a control.
: Returns the length of text in the control.
: Returns or sets a value that determines whether literals and prompt characters are included in the formatted string.
: Returns or sets the data type used to verify the data input by the user.
Returns: . If successful, an of the type specified by the property; otherwise, null to indicate conversion failure.
A critical exception occurred during the parsing of the input string.
Occurs after the input mask is changed.
Fired when the value of the property has changed.
Occurs when has finished parsing the current value using the property.
Represents a control that can be hosted in a cell.
All wisej controls derived from the class must implement this interface.