Directory
The necessity of the mask editing function
MaskedEdit Extender
Validating Mask Input
text box is completed automatically
Building the AutoComplete Web service
To set the style of the AutoComplete extender
To search the list incrementally
Pop-up context Menu
Conclusion
Last month I discussed how to use the AJAX control extender to enhance ASP.net input controls such as text boxes and buttons. This month I will use the Microsoft®.net Framework 3.5 and the latest version of ASP. NET (Beta 2 When this article was written) to add more advanced features such as mask editing and AutoComplete. In addition, I will use the latest version of the available ASP.net AJAX Control Toolkit. For information about how to obtain the required software toolkit, see the "Leading Technology" section of the previous period (see).
The necessity of the mask editing function
In HTML, the only way to accept input data is to use the <input> tag. In asp.net, the input tag is encapsulated using a TextBox control only. One problem with this control is that it does not restrict what users can type in it. However, by using a small amount of JavaScript code, you can filter out unwanted text. This is the content that was introduced last month. This month I'm going to add the mask editing feature, which allows you to filter the character characters and allow the characters to be displayed in a region-specific format. The mask editing feature can be used for filtering, validating, automatic formatting, and localization. You can also apply this feature to many real data types, including date, currency, time, postal code, phone number, social security number, or sales tax ID, and so on. In the AJAX Control Toolkit, the MaskedEdit Extender is a free component that, when attached to a TextBox control, allows you to control the input behavior in many common situations.
MaskedEdit Extender
In the AJAX Control Toolkit, the MaskedEdit Extender supports some of the data formats specified by the Maskedittype enumeration type:
public enum MaskedEditType
{
None,
Date,
Number,
Time,
DateTime
}