Partilhar via


AllowCommands Property

  Microsoft Speech Technologies Homepage

Gets or sets whether Command controls can be activated while the QA control is active. Read/write.

Usage

ASP.NET markup: <speech:QA AllowCommands="..." />
Get value: Boolean = QA.AllowCommands;
Set value: QA.AllowCommands = Boolean;
Data type: System.Boolean
Required: No; Default: True

Remarks

When the AllowCommands property is set to False, no Command controls may be activated. Default is True.

Example

In this example, the first two QA controls use the default value of the AllowCommands property, and the last QA control uses an explicit value of False. As a result, the Command is active while either of the first two QA controls is active, and inactive while the last QA is active.

<form id="Form1" method="post" runat="server">
  ...
  <asp:panel id="SpeechPanel" runat="server"> 

    <Speech:QA ID="PizzaSize" runat="server">
      <!-- QA Contents -- >
    </Speech:QA>

    <Speech:QA ID="PizzaTopping" runat="server">
      <!-- QA Contents -- >
    </Speech:QA>

    <Speech:QA ID="ReadyPrompt" runat="server" PlayOnce="true" AllowCommands="False">
      <!-- QA Contents -- >
    </Speech:QA>

  </asp:panel>

  <Speech:command ID="CmdHelp" Scope="SpeechPanel" Type="Help" XPathTrigger="/SML/Command/Help" runat="server" >
    <grammar ID="GlobalCmdHelp" src="Grammars/GlobalCommands.grxml" runat="server" />
  </Speech:command>
  ...
</form>

See Also

QA Class | QA Constructor | QA Members | QA Properties | QA Methods | QA Events | QA Remarks | QA Client Object