Partager via


YearSemanticItem Property for French (Canada)

  Microsoft Speech Technologies Homepage

Gets or sets the ID of the SemanticItem control that receives the credit card expiration year. Read/write.

Usage

ASP.NET markup: <speech:CreditCardDate YearSemanticItem="..." />
Get value: String = CreditCardDate.YearSemanticItem;
Set value: CreditCardDate.YearSemanticItem = String;
Data type: String
Required: Yes

Remarks

The control throws an ArgumentNullException if this property is not specified or an ArgumentException if this property does not specify a valid SemanticItem on the page.

Example

The following example is adapted from the Microsoft Speech Application SDK Credit Card sample.

<form id="Form1" method="post" runat="server">
  ...
  <speech:QA ID="InitialPrompt" PlayOnce="True" runat="server">
    <Prompt ID="InitialPrompt_Prompt" BargeIn="False"
      InlinePrompt="pour complêter cette transaction j'ai besoin des détails de votre carte de crédit" >
      </Prompt>
  </speech:QA>

  <speech:SemanticMap ID="CreditCardSemanticMap" runat="server">
    <speech:SemanticItem ID="siCreditCardMonth"
      TargetElement="tbCreditCardMonth" TargetAttribute="value" runat="server">
    </speech:SemanticItem>
    <speech:SemanticItem ID="siCreditCardNumber"
      TargetElement="tbCreditCardNumber" TargetAttribute="value" runat="server">
    </speech:SemanticItem>
    <speech:SemanticItem ID="siCreditCardYear"
      TargetElement="tbCreditCardYear" TargetAttribute="value" runat="server">
    </speech:SemanticItem>
  </speech:SemanticMap>

  <speech:CreditCardNumber 
    ID="GetCreditCardNumber" 
    SemanticItem="siCreditCardNumber"
    QuestionPrompt="rentrer les 16 chiffres de votre numéro de carte de crédit diners club s'il-vous-plaît" 
    AllowAmex="False"
    AllowDinersClub="True" 
    AllowDiscover="False" 
    AllowMasterCard="False"
    AllowVISA="False" 
    EnableViewState="False" 
    runat="server">
  </speech:CreditCardNumber>

  <speech:CreditCardDate 
    ID="GetCreditCardDate"     
    QuestionPrompt="quel est la date d'expiration?" 
    YearSemanticItem="siCreditCardYear"
    MonthSemanticItem="siCreditCardMonth"
    runat="server">
  </speech:CreditCardDate>

  <asp:TextBox ID="tbCreditCardNumber" runat="server"></asp:TextBox>
  <asp:TextBox ID="tbCreditCardMonth"  runat="server"></asp:TextBox>
  <asp:TextBox ID="tbCreditCardYear"   runat="server"></asp:TextBox>

  <speech:QA ID="FinalPrompt" runat="server" PlayOnce="True">
    <Prompt BargeIn="False" ID="FinalPrompt_Prompt"
      InlinePrompt="merci. votre achat vous seras envoyé d'içi trois jours ouvrables.">
    </Prompt>
  </speech:QA>
  ...
</form>

See Also

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