Share via


ApplicationControl.AutoPostBack 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 whether a control posts back to the server before moving on to the next Speech Control in the dialog. Read/write.

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

Syntax

'Declaration
<SRDescriptionAttribute("All_AutoPostBack")> _
<BindableAttribute(True)> _
<SRCategoryAttribute("Category_Speech")> _
<DefaultValueAttribute(False)> _
Public Property AutoPostBack As Boolean
[SRDescriptionAttribute("All_AutoPostBack")] 
[BindableAttribute(true)] 
[SRCategoryAttribute("Category_Speech")] 
[DefaultValueAttribute(false)] 
public bool AutoPostBack { get; set; }

Remarks

If AutoPostBack is True, the control raises the CompleteLast event immediately after OnClientCompleteLast executes. If AutoPostBack is False, the control raises the CompleteLast event when the next postback occurs. The control throws an exception if AutoPostBack is True and CompleteLast is not specified.

The ApplicationControl control conforms to the ASP.NET event model. For more information about events, autopostback, and event delegation in ASP.NET, see ASP.NET Server Control Event Model.

Example

The following example demonstrates the AutoPostBack property that is used in the CreditCardNumberApplication Speech Control.

<form id="Form1" method="post" runat="server">
  ...
  <speech:CreditCardNumber 
    ID="GetCreditCardNumber" 
    SemanticItem="siCreditCardNumber"
    QuestionPrompt="Please enter your 16 digit diners club card number" 
    AutoPostBack="True"
    AllowAmex="False"
    AllowDinersClub="True" 
    AllowDiscover="False" 
    AllowMasterCard="False"
    AllowVISA="False" 
    AllowCommands="True" 
    runat="server">
  </speech:CreditCardNumber>

  <speech:CreditCardDate 
    ID="GetCreditCardDate"     
    QuestionPrompt="What is the expiration date?" 
    AutoPostBack="True"
    YearSemanticItem="siCreditCardYear"
    MonthSemanticItem="siCreditCardMonth"
    AllowCommands="False" 
    runat="server">
  </speech:CreditCardDate>

  <Speech:command ID="CmdHelp" Scope="Form1" Type="Help" 
    XPathTrigger="/SML/Command/Help" runat="server" >
    <grammar ID="CmdHelp" src="Grammars/Commands.grxml" runat="server" />
  </Speech:command>
  ...
</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