ComponentOne Extender Controls for ASP.NET Web Forms
Wijmo Control Toolkit Extender Controls / Input Extenders / C1InputMaskExtender / Creating a Mask Requiring Letters
In This Topic
    Creating a Mask Requiring Letters
    In This Topic

    The C1InputMaskExtender widget allows you to create a mask that requires users to enter letters, for example, in an input box for a user name. Use the L masking element for the Mask property to take advantage of this feature.

    1. Create an ASP.NET Web application.
    2. Add a standard TextBox control to the main content of  your page.
    3. Click the TextBox smart tag and select Add Extender from the Tasks menu.
    4. In the Extender Wizard, select C1InputMaskExtender and click OK. A C1InputMaskExtender control is added to the page and the TargetControlID is set to TextBox1.
    5. Select View | Properties Window in the Visual Studio menu.
    6. Click the drop-down list at the top of the Properties window and select TextBox1_C1InputMaskExtender.
    7. Set the C1InputMaskExtender.Mask property to >L|LLLLLLLLL. Using an L as the masking element requires that a letter is entered. In this case, 10 letters can be entered. The >L| ensures the first letter is capitalized and the letters that follow are lowercase, unless the Shift key is used to capitalize other letters.

    The markup should now look similar to the following:

    <cc1:C1InputMaskExtender ID="TextBox1_C1InputMaskExtender" runat="server"

            Mask="&gt;L|LLLLLLLLL" TargetControlID="TextBox1">

        </cc1:C1InputMaskExtender>

    1. Press F5 to run the application. Enter some letters and notice the first letter is automatically capitalized.