![]() ![]() The currency, thousandth, and decimal characters will be replaced at run time with their culture-specific equivalents. If the user does not wish to enter the optional characters, they can either enter spaces or place the mouse pointer directly at the position in the mask represented by the first 0.Ī currency value in the range of 0 to 999999. ![]() United States phone number, area code optional. The / character in the mask is a logical date separator, and it will appear to the user as the date separator appropriate to the application's current culture.Ī date (day, month abbreviation, and year) in United States format in which the three-letter month abbreviation is displayed with an initial uppercase letter followed by two lowercase letters. The following table compares four regular expressions and the equivalent mask for each. Regular expressions can express more complex patterns than masks, but masks can express the same information more succinctly and in a culturally relevant format. Regular Expressions and MasksĪlthough you can use regular expressions and masks to validate user input, they are not completely equivalent. You can force them to display symbols for another culture by using the FormatProvider property. The decimal (.), thousandths (,), time (:), date (/), and currency ($) symbols default to displaying those symbols as defined by the application's culture. All non-mask elements will appear as themselves within MaskedTextBox. The relational comparison operators are discussed in detail on this page. Is, IsNot, and Like are discussed in detail on separate Help pages. These operators compare two expressions to determine whether or not they are equal, and if not, how they differ. You can use a mask to specify the accepted format such as IP address, telephone number, currency, and so on. The following are the comparison operators defined in Visual Basic. "\\" is the escape sequence for a backslash. When you need versatile data entry controls that restricts the users input, Telerik MaskedTextBox control for ASP.NET AJAX is the perfect match. Undoes a previous shift up or shift down.Įscapes a mask character, turning it into a literal. Plus (+) and minus (-) signs are allowed.Ĭulture-appropriate thousands placeholder.Ĭonverts all characters that follow to uppercase. If this position is left blank in the mask, it will be rendered as a space. ![]() Masking elementĪny single digit between 0 and 9. The mask must be a string composed of one or more of the masking elements from the following table. This element will accept any single digit from 0 to 9. The Mask property of the MaskedTextBox control specifies what input mask to use. The mask can be formed by combining any one or more of these mask elements. The standard MaskedTextBox masking language is based on the one used by the Masked Edit control in Visual Basic 6.0 and should be familiar to users migrating from that platform. This example demonstrates how to convert simple regular expressions to work with the MaskedTextBox control. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |