OnClientFailed Property
Gets or sets the name of a client-side function that is called when Computer-Supported Telecommunications Applications (CSTA) returns the FAILED event. Read/write.
Usage
ASP.NET markup: | <speech:TransferCall OnClientFailed="..." /> |
Get value: | String = TransferCall.OnClientFailed; |
Set value: | TransferCall.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 TransferCall.OnClientFailed
}
Parameters
- sender
The client-side TransferCall 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. In either case, the call has been lost, and further dialogue on the page cannot be continued.
Example
<script>
function MyClientTransferred(obj, cstaMessageDomObject) {
// OnClientTransferred routine
return true;
}
function myClientFailed(obj, cause, cstaMessageDomObject) {
// OnClientFailed routine
return false;
}
</script>
<form id="Form1" method="post" runat="server">
...
<speech:TransferCall
ID="transferCall1"
autopostback="False"
TransferredTo="95551212"
OnClientTransferred="MyClientTransferred"
OnClientFailed="MyClientFailed"
runat="server" />
...
</form>
See Also
TransferCall Class | TransferCall Constructor | TransferCall Members | TransferCall Properties | TransferCall Methods | TransferCall Events | TransferCall Remarks | TransferCall Client Object