ComponentOne Input for ASP.NET WebForms
Task-Based Help / C1InputMask Tasks / Changing the Prompt Character
In This Topic
    Changing the Prompt Character
    In This Topic

    At run time, the C1InputMask control displays the mask as a series of prompt characters (for example, # or _). The prompt characters represent each editable mask position. To change the prompt character, use the PromptChar property. This example uses the C1InputMask control with the Phone number mask: (999) 000-0000.

    To change the prompt character using the Tasks menu:

    To change the phone number PromptChar property, open the C1InputMask Tasks menu and enter the number sign (#) in the PromptChar text box.

    To change the prompt character using .html markup:

    To change the prompt character to the number sign (#) for the C1InputMask control, use the following markup in the .aspx page:

    To write code in Source View

    <cc1:C1InputMask ID="C1InputMask1" runat="server" 
    Mask="(999) 000-0000"
    Text="412"
    PromptChar="#">
    </cc1:C1InputMask>

    This topic illustrates the following:

    Run the project and notice that the number sign (#) is displayed as the prompt character in the Web browser, as shown here:

    Note that the 412 area code appears instead of the number signs since the Text property was specified for the control.

    For details on hiding the prompt characters when the input box loses focus, see the Hiding the Prompt Character on Leave topic.