Freigeben über


OnClientBargeIn Property

  Microsoft Speech Technologies Homepage

Gets or sets the name of a client-side function that is called when the platform detects client bargein. Read/write.

Usage

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

Remarks

The value of the OnClientBargeIn property is the name of the custom client-side script function, without parameters or parentheses. The client-side dialog manager calls this function, using the following syntax, when a client bargein event is detected.

The script block that contains this function should be placed before the control that calls the function. For more information, see "Placement of Script Blocks" in Authoring Notes.

Syntax

bool FunctionName ()
{
     // Client-side code referenced by DialogPrompt.OnClientBargeIn
}

Parameters

None.

Return Value

None.

Example

<form id="Form1" method="post" runat="server">
  ...
  <script>
  function myBargeIn ( status ) 
  {
    // OnClientBargeIn code here
  }
  </script>
  ...
  <speech:qa ID="qaOrig" runat="server">
    <Prompt ID="prmptOrig" OnClientBargeIn="myBargeIn"
      InlinePrompt="What is your originating city?" >
    </Prompt>
    <Reco ID="recoOrig">
      <Grammars>
        <speech:Grammar Src="grammars/cities.xml" runat="server"></speech:grammar>
      </Grammars>
    </Reco>
    <Answers>
      <speech:Answer ID="ansOrig" XPathTrigger="/sml/origcity" SemItem="siOrig" runat="server">
      </speech:Answer>
    </Answers>
  </speech:qa>
  ...
</form>

See Also

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