DateContext Property for French (Canada)
Gets or sets the temporal context of ambiguous dates. Read/write.
Usage
ASP.NET markup: | <speech:Date DateContext="..." /> |
Get value: | DateContextEnumeration = Date.DateContext; |
Set value: | Date.DateContext = DateContextEnumeration; |
Data type: | DateContextEnumeration |
Required: | No; Default: Neutral |
Remarks
The DateContext property can be set to the following values: Past, Future, or Neutral.
The DateContext property is used only when date information spoken by the user is ambiguous, for example, "Tuesday" or "Thanksgiving". When input data is not ambiguous, for example, "last Tuesday", "next Thanksgiving" or "January first 2005", the setting of the DateContext property is ignored.
The DateContext property does not restrict user input. A DateContext setting of Past, for example, does not prevent the user from entering a date in the future.
Example
<form id="Form1" method="post" runat="server">
...
<speech:semanticmap id="SemanticMap1" runat="server">
<speech:SemanticItem ID="DaySemItem" TargetAttribute="value"
TargetElement="tbDay" runat="server">
</speech:SemanticItem>
<speech:SemanticItem ID="MonthSemItem" TargetAttribute="Text"
BindAt="server" TargetElement="tbMonth" runat="server">
</speech:SemanticItem>
<speech:SemanticItem ID="YearSemItem" TargetAttribute="value"
BindOnChanged="True" TargetElement="tbYear" runat="server">
</speech:SemanticItem>
</speech:semanticmap>
<speech:date
id="Date1"
QuestionPrompt="quand est-ce que vous aimeriez voyager?"
DateContext="Future"
DaySemanticItem="DaySemItem"
MonthSemanticItem="MonthSemItem"
YearSemanticItem="YearSemItem"
SpeechIndex="1000"
OnClientActive="MyClientActive"
runat="server">
</speech:date>
<asp:textbox id="tbDay" runat="server"></asp:textbox>
<asp:TextBox id="tbMonth" runat="server"></asp:TextBox>
<asp:TextBox id="tbYear" runat="server"></asp:TextBox>
...
</form>
See Also
Date Class | Date Constructor | Date Members | Date Properties | Date Methods | Date Events | Date Remarks