Share via


OnClientError Property

  Microsoft Speech Technologies Homepage

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

Usage

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

Remarks

Different types of errors are distinguished by status codes. See the onerror event of the client-side dtmf element for a list of these codes.

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

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 ( int status )
{
     // Client-side code referenced by DTMF.OnClientError
}

Parameters

  • status
    The code returned in the event object.

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

<form id="Form1" method="post" runat="server">
  <script>
    function myClientError(status) {
      // OnClientError routine
      return true;
    }
  </script>

  <speech:Dtmf runat="server"
    ID="Dtmf1"
    PreFlush="True"
    InitialTimeout="2500"
    InterDigitTimeout="2500"
    EndSilence="2000">
    OnClientError="myClientError"
  </speech:Dtmf>
  ...
</form>

See Also

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