Share via


OnClientConnected Property

  Microsoft Speech Technologies Homepage

Gets or sets the name of a client-side function that is called when the call is connected. Read/write.

Usage

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

Remarks

The value of the OnClientConnected property is the name of this custom client-side script function, without parameters or parentheses. The client-side dialog manager calls this function, using the following syntax, when the call is connected.

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

function FunctionName ( object sender, string CalledDirectoryNumber )
{
     // Client-side code referenced by MakeCall.OnClientConnected 
}

Parameters

  • sender
    The client-side MakeCall object.
  • CalledDirectoryNumber
    The value of the object's CalledDirectoryNumber property.

Return Value

None.

Example

<script>
  function myClientConnected(sender, callednumber) {
    // OnClientConnected routine
    return true;
  }
  function myClientFailed(obj, number, cstaMessageDomObject) {
    // OnClientFailed routine
    return false;
  }
</script>
<form id="Form1" method="post" runat="server">
  ...
  <speech:MakeCall 
    ID="makeCall1"  
    autopostback="False"
    CallingDevice="0"
    CalledDirectoryNumber="95551212"
    OnClientConnected="myClientConnected"
    OnClientFailed="myClientFailed"
    runat="server" />
  ...
</form>

See Also

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