Freigeben über


OptionalPreAnswerRule Property for French (Canada)

  Microsoft Speech Technologies Homepage

Gets or sets the name of the rule in the optional grammar that contains phrases used before providing an answer. Read/write.

Usage

ASP.NET markup: <speech:ApplicationControl OptionalPreAnswerRule="..." />
Get value: String = ApplicationControl.OptionalPreAnswerRule;
Set value: ApplicationControl.OptionalPreAnswerRule = String;
Data type: String
Required: No

Remarks

The optional grammar is specified by the OptionalRulesGrammarUrl property of the control.

The control throws an exception if an OptionalPreAnswerRule is specified and OptionalRulesGrammarUrl is not specified.

Example

<form id="Form1" method="post" runat="server">
  ...
  <speech:NaturalNumber 
    id="NaturalNumber1"
    QuestionPrompt="combiens de personnes sont avec vous?" 
    LowerBound="1"
    UpperBound="99"
    SemanticItem="SemanticItem1" 
    ConfirmRejectThreshold="0.2"
    FirstInitialTimeout="2500"
    OptionalRulesGrammarUrl="Optional.grxml" 
    OptionalPreAnswerRule="PreAnswer"
    OptionalPostAnswerRule="PostAnswer"  
    OptionalPreConfirmRule="PreConfirm"
    OptionalPostConfirmRule="PostConfirm"
    runat="server">
  </speech:NaturalNumber>

  <speech:SemanticMap id="SemanticMap1" runat="server">
    <speech:SemanticItem runat="server" TargetAttribute="value" ID="SemanticItem1"     
      TargetElement="TextBox1">
    </speech:SemanticItem>
  </speech:SemanticMap>

  <asp:TextBox id="TextBox1" runat="server"></asp:TextBox>
  ...
</form>

See Also

ApplicationControl Class | ApplicationControl Constructor | ApplicationControl Members | ApplicationControl Properties | ApplicationControl Methods | ApplicationControl Events | ApplicationControl Remarks