Free Trial Buy Now

Common Features - Masked Input

Zip Code:  
Mask = 00000
ErrorText = "Please input missing digits"
PromptChar = 
v
Phone Number:  
Mask = +1 (999) 000-0000
IncludeLiterals = None
Value =
Price:  
Mask = $<0..99999g>.<00..99>
IncludeLiterals = DecimalSymbol
Value =
Date:  
v
UseMaskBehavior = True
EditFormatString = 
v
Promo Code:  
Mask = <HOME|*BUSINESS>->aaaa-aaaa
ShowHints = True

Description

The DevExpress editors allow you to use masks during editing. Masks are useful when a string entered by an end-user into an editor should match a specific format. For instance, a text editor should accept date/time values in the 24-hour format only, or only numeric values, or a phone number that only allows an end-user to enter digits into automatically constructed placeholders.

Within the ASPxEditors library, masked input is supported by the following editor types:

  • Text box editors (in particular, the ASPxTextBox and ASPxButtonEdit).
    A text box mask settings can be accessed via the MaskSettings property. The editors mask can be specified via the MaskSettings.Mask property.
  • Date editors (ASPxDateEdit).
    To enable masked input within a date editor, the UseMaskBehavior property should be set to true. The mask can be defined via the EditFormatString property, if the EditFormat property is set to Custom.

See how masked input behavior is implemented in this demo to facilitate entering different types of data into the forms editors.

Version: v2012 vol 2.8
Experience the DevExpress Difference Today
Demos with source code are included with an installation of DevExpress controls for ASP.NET. Refer to the Demos and Sample Applications topic to learn more.
To download your free evaluation copy of our award-winning ASP.NET libraries, visit the Downloads page
All DevExpress ASP.NET Controls ship as part of DXperience ASP.NET, Enterprise, and Universal.
To obtain pricing information, visit the Pricing Options page or contact us via Email at info@devexpress.com
or by telephone at +1 (818) 844-3383 between 8:30am and 5pm Pacific Time.