ASP.NET AJAX Control Toolkit Demos v17.1.1.0

MaskedEdit Sample
Ajax Control Toolkit
MaskedEdit Demonstration
Enter a Number (format: 9,999,999.99):

Tip: Type '.' to switch

Enter Time (format: 99:99:99):

Tip: Type 'A' or 'P' to switch AM/PM

Enter Date (format: 99/99/9999):

Tip: The date format is mm/dd/yyyy for this example and a Calendar is also available for date selection

Enter Date and Time (format: 99/99/9999 99:99:99)

MaskedEdit Description
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 Properties
Properties
  • 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
  • AutoComplete - Set to True to automatically fill in empty mask characters not specified by a user
  • 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
  • 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
  • Mask - A mask to be applied to the target TextBox
  • MaskType - A type of validation to perform
  • 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
MaskedEdit Validator Description
MaskedEditValidator is a custom validator that attaches to the MaskedEdit extender and associates the TextBox and verifies that the input text matches the pattern specified in the MaskedEdit extender. Once associated with a validation group, server- and client-side validation can be performed and used to display messages.
MaskedEditValidator Properties
Properties
  • ClientValidationFunction - A client script used for custom validation
  • ControlExtender - ID of the MaskedEditExtender attached to the TextBox
  • EmptyValueBlurredText - A message displayed when text is empty and the TextBox does not have focus
  • EmptyValueMessage - A message displayed when test is empty and the TextBox has focus
  • InitialValue - The initial value of the TextBox
  • InvalidValueBlurredMessage - A message displayed when text is invalid and the TextBox does not have focus
  • InvalidValueMessage - A message displayed when text is invalid and the TextBox has focus
  • IsValidEmpty - Set to True if the TextBox can be empty
  • MaximumValue - A maximum value of the input
  • MaximumValueBlurredMessage - A message displayed when the maximum value is exceeded and the TextBox does not have focus
  • MaximumValueMessage - A message displayed when the maximum value is exceeded and the TextBox has focus
  • MinimumValue - A minimum value of the input
  • MinimumValueBlurredText - A message displayed when the minimum value is exceeded and the TextBox does not have focus
  • MinimumValueMessage - A message displayed when the minimum value is exceeded and the TextBox has focus
  • TooltipMessage - A message displayed when the TextBox has focus with an empty value
  • ValidationExpression - A regular expression used to validate the input
MaskedEdit Known Issues

Opera's keyboard handling implementation causes the "." key to map to "Del" and the "Ins" key to map to "-".

Copyright © 2012-2017 CodePlex Foundation. All Rights Reserved.