Skip to content

MaskedEditExtender

MikhailTymchukDX edited this page Aug 24, 2016 · 2 revisions

Demo Page

MaskedEdit is an ASP.NET AJAX extender that attaches to the TextBox control to restrict what text that can be entered. MaskedEdit applies a mask to the input that permits only certain types of characters/text to be entered. The supported data formats are: Number, Date, Time, and DateTime.

MaskedEdit uses culture settings specified in the CultureName property. If none of these settings is specified, the culture setting will be the same as the page: English (United States).

Properties

Name Description
AcceptAMPM Determines whether or not AM/PM is accepted on time. The default value is false
AcceptNegative Set to True if the negative sign (-) is allowed
Remarks: Possible values: None - Do not show the negative sign Left- Show the negative sign on the left of the mask Right - Show the negative sign on the right of the mask
AutoComplete Set to True to automatically fill in empty mask characters not specified by a user
Remarks: MaskType=Number - Empty mask characters will be filled with zeros MaskType=Time - Empty mask characters will be filled with the current time MaskType=Date - Empty mask characters will be filled with the current date MaskType=DateTime - Empty mask characters will be filled with the current date/time
AutoCompleteValue A Default character to use when AutoComplete is enabled
Century A default century used when a date mask only has two digits for the year
ClearMaskOnLostFocus Set to True to remove a mask when the TextBox loses focus
ClearTextOnInvalid Set to True to clear the TextBox when invalid text is entered
ClipboardEnabled Set to True to allow the copy/paste operation with the clipboard
ClipboardText Prompt text to use when the clipboard paste is performed
CultureAMPMPlaceholder Culture override
CultureCurrencySymbolPlaceholder Culture override
CultureDateFormat Culture override
CultureDatePlaceholder Culture override
CultureDecimalPlaceholder Culture override
CultureName The name of a culture to use (overrides the default page culture)
CultureThousandsPlaceholder Culture override
CultureTimePlaceholder Culture override
DisplayMoney Specifies how the currency symbol is displayed
Remarks: Possible values: None - Do not show the currency symbol Left - Show the currency symbol on the left of the mask Right - Show the currency symbol on the right of the mask
ErrorTooltipCssClass A CSS class for the tooltip message
ErrorTooltipEnabled Set to True to show a tooltip message when the mouse hovers over an invalid TextBox
Filtered Valid characters for mask type C (case-sensitive)
InputDirection Text input direction
Remarks: Possible values: LeftToRight - Left to Right RightToLeft - Right to left
Mask A mask to be applied to the target TextBox
MaskType A type of validation to perform
Remarks: Possible values: None - No validation Number - Number validation Date - Date validation Time - Time validation DateTime - Date and time validation
MessageValidatorTip A message displayed when editing in the TextBox
OnBlurCssNegative A CSS class used when the TextBox loses focus with a negative value
OnFocusCssClass A CSS class used when the TextBox receives focus
OnFocusCssNegative A CSS class used when the TextBox gets focus with a negative value
OnInvalidCssClass A CSS class used when the text is not valid
PromptCharacter Prompt character
UserDateFormat A custom date format
UserTimeFormat A custom time format
Clone this wiki locally