Compartir a través de


SemanticItem Property for French (Canada)

  Microsoft Speech Technologies Homepage

Gets or sets the ID of the SemanticItem control that receives the value of the chosen item. Read/write.

Usage

ASP.NET markup: <speech:ListSelector SemanticItem="..." />
Get value: String = ListSelector.SemanticItem;
Set value: ListSelector.SemanticItem = String;
Data type: String
Required: Yes

Remarks

The control throws an ArgumentNullException if this property is not specified, or it throws an ArgumentException if this property does not specify a valid SemanticItem on the page.

Attribute data

When the ListSelector control has collected a list item successfully, it places the following attributes in the SemanticItem property.

Attribute Name Data Element
spokenText The text spoken by the user
index The row index

Application authors can reference SemanticItem attribute data by means of the GetAttribute method of the client-side SemanticItem object.

Example

<form id="Form1" method="post" runat="server">
  ...
  <asp:dropdownlist id=DropDownList1 runat="server" DataSource="<%# aWords %>">
  </asp:dropdownlist>

  <asp:textbox id="TextBox1" runat="server" Rows="10" TextMode="MultiLine">
  </asp:textbox>
  <speech:semanticmap id="SemanticMap1" runat="server">
      <speech:SemanticItem id="SemanticItem1" runat="server" OnClientConfirmed="onWordSelected">
      </speech:SemanticItem>
      <speech:SemanticItem id="SemanticItem2" runat="server" OnClientConfirmed="onYesNo">
      </speech:SemanticItem>
  </speech:semanticmap>

  <speech:qa id="Welcome" runat="server" PlayOnce="True" AllowCommands="False">
      <Prompt InlinePrompt="bienvenue a notre dictionnaire en ligne"></Prompt>
  </speech:qa>

  <speech:ListSelector id=SingleItemChooser1 runat="server" 
    ClientActivationFunction="selectionActivation" 
    DataSource="<%# aWords %>" 
    PromptSelectFunction="selectionPromptSelectFunction" 
    OnClientCompleteLast="onSelectionComplete" 
    SemanticItem="SemanticItem1" 
    QuestionPrompt="vous-voulez la définition de quel mot?" 
    FirstInitialTimeout="0">
  </speech:ListSelector>

  <speech:qa id="Definition" runat="server" 
    AllowCommands="False">
    <Prompt PromptSelectFunction="definitionPromptSelectFunction"></Prompt>
  </speech:qa>

  <speech:yesno id="YesNo1" runat="server"
    PromptSelectFunction="yesnoPromptSelectFunction" 
    SemanticItem="SemanticItem2" 
    QuestionPrompt="voulez-vous en savoir plus pour un autre mot?"
    ClientActivationFunction="yesnoActivation" 
    FirstInitialTimeout="0">
  </speech:yesno>

  <speech:command id="Command1" runat="server" 
    XPathTrigger="//Help" Type="Help" Scope="WebForm1">
    <Grammar Src="./Grammars/HelpGlobalCommand.grxml"></Grammar>
  </speech:command>
  ...
</form>

See Also

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