Share via


AutoPostBack Property

  Microsoft Speech Technologies Homepage

Gets or sets whether the SemanticItem control posts back to the server when its binding event is detected. Read/write.

Usage

ASP.NET markup: <speech:SemanticItem AutoPostBack="..." />
Get value: Boolean = SemanticItem.AutoPostBack;
Set value: SemanticItem.AutoPostBack = Boolean;
Data type: System.Boolean
Required: No; Default: False

Remarks

The BindOnChanged property specifies the binding event.

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

Example

<script runat="server">
  function DateAnswer_Triggered(o, e){
    SetCalendar(Sample7Calendar, e.Text, tbInvisibleDate);
    Page.Validate();
  }
</script>

<form id="Form1" method="post" runat="server">
  ...
  <asp:calendar ID="Sample7Calendar" runat="server" backcolor="White" width="300px" daynameformat="FirstLetter"
    forecolor="Black" height="300px" font-size="8pt" font-names="Verdana" bordercolor="Black"
    cellpadding="4">
    <todaydaystyle forecolor="Black" backcolor="#CCCCCC"></todaydaystyle>
    <selectorstyle backcolor="Olive"></selectorstyle>
    <nextprevstyle verticalalign="Bottom"></nextprevstyle>
    <dayheaderstyle font-size="7pt" font-bold="True" backcolor="#C0C0FF"></dayheaderstyle>
    <selecteddaystyle font-bold="True" forecolor="White" backcolor="#666666"></selecteddaystyle>
    <titlestyle font-bold="True" bordercolor="Black" backcolor="#999999"></titlestyle>
    <weekenddaystyle backcolor="#FFFFCC"></weekenddaystyle>
    <othermonthdaystyle forecolor="Gray"></othermonthdaystyle>
  </asp:calendar>

  <asp:textbox ID="tbInvisibleDate" runat="server"></asp:textbox>

  <asp:panel ID="CalendarPanel" runat="server">

    <speech:SemanticMap ID="TheSemanticMap" runat="server">
      <speech:SemanticItem ID="siDate" AutoPostBack="true" OnConfirmed="DateAnswer_Triggered" runat="server">
      </speech:SemanticItem>
    </speech:SemanticMap>

    <speech:command ID="CmdHelp" runat="server" Scope="AskDateQA" Type="Help" XPathTrigger="/SML/Command/Help">
      <grammar ID="GlobalCmdHelp" runat="server" Src="Grammars/GlobalCommandHelp.grxml" />
    </speech:command>

    <speech:CustomValidator ID="ValidateQA" runat="server" 
      ClientValidationFunction="Date_Validator" ValidationEvent="onchange"
      SemanticItemToValidate="siDate">
      <Prompt PromptSelectFunction="SayInvalidDate_PromptFunction" BargeIn="False" ID="SayInvalidDate">
      </Prompt>
    </speech:CustomValidator>

    <speech:qa ID="AskDateQA" runat="server">
      <Prompt PromptSelectFunction="AskDate_PromptFunction" ID="AskDate">
        <Params>
          <speech:Param Name="bargeintype">grammar</speech:Param>
        </Params>
      </Prompt>
      <Answers>
        <speech:Answer ClientNormalizationFunction="Date_Normalize" SemanticItem="siDate" ID="SayDate"
          XPathTrigger="/SML/Date"></speech:Answer>
      </Answers>
      <Reco InitialTimeout="3000" BabbleTimeout="10000" EndSilence="1000" MaxTimeout="30000"
        ID="recDay">
        <Grammars>
          <speech:Grammar Src="Grammars/DateGrammar.grxml" ID="DateGram"></speech:Grammar>
        </Grammars>
      </Reco>
    </speech:qa>

  </asp:panel>
  ...
</form>

See Also

SemanticItem Class | SemanticItem Constructor | SemanticItem Members | SemanticItem Properties | SemanticItem Methods | SemanticItem Events | SemanticItem Remarks | SemanticItem Client Object