Task-Based Help > C1InputMask Tasks > Displaying the Date Mask without Prompt Characters |
To create an input box for the date that does not contain prompt characters (for example, " / / "), use the C1InputMask control and set the PromptChar property to space, " ".
To create a short date mask without prompt characters using the Tasks menu:
To create a Short Date input box that does not contain prompt characters, complete the following tasks:
To create a short date mask without prompt characters using .html markup:
To create a Short Date input box that does not contain prompt characters, use the following markup in the .aspx page:
To write code in Source View
<cc1:C1InputMask ID="C1InputMask1" runat="server" Mask="00/00/0000" PromptChar=" ">
</cc1:C1InputMask>
To create a short date mask without prompt characters using code:
To create a short date mask without prompt characters for the C1InputMask control, double-click the Web page to create an event handler for the Load event. Enter the following code for the Page_Load event:
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
With C1InputMask1 .MaskFormat = "00/00/0000" .PromptChar = " " End With |
To write code in C#
C# |
Copy Code
|
---|---|
this.C1InputMask1.MaskFormat = "00/00/0000"; this.C1InputMask1.PromptChar = char.Parse(" "); |
This topic illustrates the following:
Run the project and notice that the Short Date mask is displayed without prompt characters, as shown here: