Compartir a través de


BindAt Property

  Microsoft Speech Technologies Homepage

Gets or sets whether the SemanticItem control binds to the target control at the server or at the client. Read/write.

Usage

ASP.NET markup: <speech:SemanticItem BindAt="..." />
Get value: String = SemanticItem.BindAt;
Set value: SemanticItem.BindAt = String;
Data type: String
Required: No; Default: Null

Remarks

If the value of BindAt is server then binding occurs on the server; if BindAt is "", or not specified, then binding occurs on the client.

The control raises the ArgumentException under any of the following conditions:

  • The value of BindAt is invalid
  • BindAt is "server" and SemanticItem.TargetElement is not a server-side control
  • BindAt is "server" and SemanticItem.TargetAttribute is not a member of the control specified by SemanticItem.TargetElement
  • BindAt is "server" and SemanticItem.TargetAttribute is a member of SemanticItem.TargetElement, but is not of type string,
  • BindAt is "server" and SemanticItem.TargetAttribute is a string, but is read-only.

Example

<form runat=server>
  ...
  <asp:label runat=server>Beverage Type: </asp:label>
  <asp:textbox id="txtBeverage" runat=server></asp:textbox><br />
  <asp:label runat=server>Number of shots: </asp:label>
  <asp:textbox id="txtShots" runat=server></asp:textbox><br />
  <asp:label runat=server>Temperature: </asp:label>
  <asp:textbox id="txtTemp" runat=server></asp:textbox><br />
  <asp:label runat=server>Container Size: </asp:label>
  <asp:textbox id="txtSize" runat=server></asp:textbox><br />
  ...
  <Speech:SemanticMap ID="TheSemanticMap" runat="server">

    <Speech:SemanticItem ID="siDrink" runat="server"
      BindAt="server" TargetElement="txtBeverage" TargetAttribute="value" >
    </Speech:SemanticItem>

    <Speech:SemanticItem ID="siShots" runat="server"
      BindAt="server" TargetElement="txtShots" TargetAttribute="value" >
    </Speech:SemanticItem>

    <Speech:SemanticItem ID="siTemp"  runat="server"
      BindAt="server" TargetElement="txtTemp" TargetAttribute="value" >
    </Speech:SemanticItem>

    <Speech:SemanticItem ID="siSize"  runat="server"
      BindAt="server" TargetElement="txtSize" TargetAttribute="value" >
    </Speech:SemanticItem>

  </Speech:SemanticMap>
  ...
  <Speech:QA runat=server>
    <Prompt inlinePrompt="What kind of coffee would you like?" />
    <Reco Reject=".5" InitialTimeout="3000" BabbleTimeout="10000" EndSilence="1000" MaxTimeout="30000">
      <Grammars>
        <speech:Grammar src="Grammars\caffe.xml" />
      </Grammars>
    </Reco>
    <Answers>
      <speech:Answer XPathTrigger="/SML/TYPE"        SemanticItem="siDrink" />
      <speech:Answer XPathTrigger="/SML/SHOTS"       SemanticItem="siShots" />
      <speech:Answer XPathTrigger="/SML/TEMPERATURE" SemanticItem="siTemp" />
      <speech:Answer XPathTrigger="/SML/SIZE"        SemanticItem="siSize" />
    </Answers>
  </Speech:QA>
  ...
</form>

See Also

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