Share via


ApplicationControl.OnClientActive Property

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Gets or sets the OnClientActive property of QA controls that are created by the control. Read/write.

Namespace: Microsoft.Speech.Web.UI
Assembly: Microsoft.Speech.Web (in microsoft.speech.web.dll)

Syntax

'Declaration
<SRDescriptionAttribute("All_OnClientActive")> _
<BindableAttribute(True)> _
<SRCategoryAttribute("Category_ClientEvents")> _
<DefaultValueAttribute("")> _
Public Property OnClientActive As String
[SRDescriptionAttribute("All_OnClientActive")] 
[BindableAttribute(true)] 
[SRCategoryAttribute("Category_ClientEvents")] 
[DefaultValueAttribute("")] 
public string OnClientActive { get; set; }

Property Value

None.

Remarks

The value of the OnClientActive 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, after the QA control has been activated and before processing the QA property (for example, playing a prompt or starting recognition).

The script block that contains this function should be placed before the control that calls the function. For more information, see Authoring Notes.

Example

The following example demonstrates the OnClientActive property that is used in a DateApplication Speech Control.

<script>
  function myClientActive() {
    // OnClientActive routine
    return true;
  }
</script>

<form id="Form1" method="post" runat="server">
  ...
  <speech:Date 
    id="Date1" 
    QuestionPrompt="When would you like to travel?" 
    DateContext="Future"
    AllowHolidays="True"
    AllowNumeralDates="True"
    AllowRelativeDates="True"
    DaySemanticItem="DaySemItem" 
    MonthSemanticItem="MonthSemItem"
    YearSemanticItem="YearSemItem" 
    ConfirmThreshold="0.6" 
    OnClientActive="myClientActive"
    runat="server">
  </speech:date>

  <asp:textbox id="tbDay" runat="server"></asp:textbox>
  <asp:TextBox id="tbMonth" runat="server"></asp:TextBox>
  <asp:TextBox id="tbYear" runat="server"></asp:TextBox>
  ...
</form>

Thread Safety

All public static (Shared in Visual Basic) members of this type are thread-safe. Instance members are not guaranteed to be thread-safe.

Platforms

Development Platforms

Windows XP Professional with Service Pack 2 (SP2), Windows Server 2003, Windows Vista Ultimate Edition, Windows Vista Business Edition, Windows Vista Enterprise Edition

Target Platforms

Windows Server 2003

See Also

Reference

ApplicationControl Class
ApplicationControl Members
Microsoft.Speech.Web.UI Namespace