Share via


ApplicationControl.OptionalPreAnswerRule Property

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

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

Namespace: Microsoft.Speech.Web.UI
Assembly: Microsoft.Speech.Web (in microsoft.speech.web.dll)

Syntax

'Declaration
<DefaultValueAttribute("")> _
<SRCategoryAttribute("Category_Speech")> _
<SRDescriptionAttribute("All_OptionalPreAnswerRule")> _
<BindableAttribute(True)> _
Public Property OptionalPreAnswerRule As String
[DefaultValueAttribute("")] 
[SRCategoryAttribute("Category_Speech")] 
[SRDescriptionAttribute("All_OptionalPreAnswerRule")] 
[BindableAttribute(true)] 
public string OptionalPreAnswerRule { get; set; }

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="How many people are in your party?" 
    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>

Thread Safety

All public static (Shared in Visual Basic) members of this type are thread-safe. Instance members are not guaranteed to be thread-safe.

Platforms

Development Platforms

Windows XP Professional with Service Pack 2 (SP2), Windows Server 2003, Windows Vista Ultimate Edition, Windows Vista Business Edition, Windows Vista Enterprise Edition

Target Platforms

Windows Server 2003

See Also

Reference

ApplicationControl Class
ApplicationControl Members
Microsoft.Speech.Web.UI Namespace