OnClientFailed Property
![]() |
Gets or sets the name of a client-side function that is called when Computer Supported Telecommunications Applications (CSTA) returns a FAILED event. Read/write.
Usage
ASP.NET markup: | <speech:DisconnectCall OnClientFailed="..." /> |
Get value: | String = DisconnectCall.OnClientFailed; |
Set value: | DisconnectCall.OnClientFailed = String; |
Data type: | String |
Required: | No |
Remarks
The value of the OnClientFailed 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 CSTA returns a FAILED event.
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 ( object sender, string cause, object cstaMessageDomObject )
{
// Client-side code referenced by DisconnectCall.OnClientFailed
}
Parameters
- sender
The client-side DisconnectCall object. - cause
The reason for failure returned from the telephony interface manager. - cstaMessageDomObject
The Microsoft.SpeechServer.Dom.Results.Element object that contains the Smex message.
Return Value
True if the dialog manager should continue on the same page, and False if it should navigate to the default error page.
Example
<script>
function myClientDisconnected(obj, cstaMessageDomObject) {
// OnClientDisconnected routine
return true;
}
function myClientFailed(obj, cause, cstaMessageDomObject) {
// OnClientFailed routine
return false;
}
</script>
<form id="Form1" method="post" runat="server">
...
<speech:DisconnectCall
ID="DisconnectCall1"
SpeechIndex="2"
autopostback="True"
OnClientFailed="myClientFailed"
OnClientDisconnected="myClientDisconnected"
runat="server" />
...
</form>
See Also
DisconnectCall Class | DisconnectCall Constructor | DisconnectCall Members | DisconnectCall Properties | DisconnectCall Methods | DisconnectCall Events | DisconnectCall Remarks