InputMask Property for French (Canada)
Gets or sets the format of the input to the AlphaDigit control. Read/write.
Usage
ASP.NET markup: | <speech:AlphaDigit InputMask="..." /> |
Get value: | String = AlphaDigit.InputMask; |
Set value: | AlphaDigit.InputMask = String; |
Data type: | String |
Required: | Yes |
Remarks
The InputMask format follows these rules:
Each position in valid input strings is characterized by a wildcard or a range in brackets.
A wildcard can be either "A" for an alphabetical character, "D" for a numerical character, or "." for either a numerical or alphabetical character. Each wildcard represents one character only.
A range in brackets specifies what characters are acceptable. The allowable characters can be listed without spaces or commas. For example:
[123] allows "one," "two," or "three."
A single character in brackets is also permitted, that is, [1] is valid. A range of allowed characters or numbers can also be specified with a hyphen:
[1-3] allows values one through three.
A range specified in the form [x-y] is valid only if x < y. Multiple range and values can be concatenated together in a set: [1-5a-eiou]. Overlapping ranges are allowed; [1-53-8] is valid. Wildcard characters are not permitted inside brackets; [A] is not valid.
Spaces are permitted anywhere in the input mask string and are ignored, but the mask cannot consist only of white space. It must contain data.
InputMask syntax is case-sensitive. Ranges of letters must be specified in lowercase, [a-e], and wildcards must be specified in uppercase.
Multiple input masks can be strung together using the "|" character. The masks are then active in parallel and a string matching any of the masks is accepted.
Input masks that do not follow the preceding rules generates an error at design time. Empty input masks generate an error at runtime.
When the SR engine recognizes individual letters of the alphabet, the resulting SML expresses those letters as initials. For example, the spoken letters "ay bee cee" are returned in SML as "a. b. c." When using the Speech Debugging Console to enter individual letters of the alphabet as text input to the AlphaDigit control, it is necessary to emulate the SML format that would be returned from speaking the same letters. For example, to emulate the spoken text "ay bee cee" using the Speech Debugging Console, it is necessary to type "a. b. c."
Example
The following example demonstrates an AlphaDigit control with an InputMask property that specifies a six-digit numeric field.
<form id="Form1" method="post" runat="server">
...
<speech:SemanticMap id="SemanticMap1" runat="server">
<speech:SemanticItem ID="siPIN" SensitiveData="true" autopostback="true" runat="server">
</speech:SemanticItem>
</speech:SemanticMap>
<Speech:AlphaDigit id="AskPIN"
QuestionPrompt="rentrer les six chiffres de votre numéro d'identification personnel s'il-vous-plaît"
BargeIn="True"
SemanticItem="siPIN"
InputMask="DDDDDD"
Grouping="True"
ConfirmThreshold="0"
AllowDtmf="true"
runat="server">
</Speech:AlphaDigit>
...
</form>
See Also
AlphaDigit Class | AlphaDigit Constructor | AlphaDigit Members | AlphaDigit Properties | AlphaDigit Methods | AlphaDigit Events | AlphaDigit Remarks