Share via


ApplicationControl.OnClientActiveFirst 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 name of a client-side function that is called on activation of the first QA control in the control. Read/write.

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

Syntax

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

Property Value

None.

Remarks

The value of the OnClientActiveFirst 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 first QA control has been activated.

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 OnClientActiveFirst property that is used in a DateApplication Speech Control.

<script>
  function myClientActiveFirst() {
    // OnClientActiveFirst 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" 
    OnClientActiveFirst="myClientActiveFirst"
    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