ContentTemplate Property for French (Canada)
Gets or sets the name of the template that defines how the contents are played. Read/write.
Usage
ASP.NET markup: | <speech:DataTableNavigator ContentTemplate="..." /> |
Get value: | ITemplate = DataTableNavigator.ContentTemplate; |
Set value: | DataTableNavigator.ContentTemplate = ITemplate; |
Data type: | ITemplate |
Required: | No; Default: Null |
Remarks
The default behavior of the DataTableNavigator with regard to content fields is to speak the data in each specified content field. The ContentTemplate property enables application authors to customize the speaking of the content fields with additional text.
When the Speech Platform plays the prompt, it attempts to use recorded text from a PromptDatabase, and synthesizes the text if recorded text is not found.
Example
In the following example, the ContentTemplate property causes the control to speak the content fields as "nuageux, avec une température maximale de vingt degrés et minimale de dix degrés" rather than as "nuageux, vingt, dix."
<form id="Form1" method="post" runat="server">
...
<asp:textbox id="TextBox1" runat="server"></asp:textbox>
<speech:semanticmap id="SemanticMap1" runat="server" >
<speech:SemanticItem id="SemItemNav" runat="server"
TargetElement="TextBox1" TargetAttribute="value" BindOnChanged="True">
</speech:SemanticItem>
</speech:semanticmap>
<speech:DataTableNavigator
id="Navigator1"
QuestionPrompt="quand est-ce que vous aimeriez voyager?"
DataHeaderFields="ville,état"
DataContentFields="conditions,maximum,minimum"
EndSilence="2500" ShortInitialTimeout="2000"
AccessMode="Select"
SemanticItem="SemItemNav"
runat="server">
<HeaderTemplate>
le temps maintenant dans
<%# DataBinder.Eval(Container.DataItem, "City")%>,
<%# DataBinder.Eval(Container.DataItem, "State")%>
</HeaderTemplate>
<ContentTemplate>
<%# DataBinder.Eval(Container.DataItem, "Conditions")%>,
avec un maximum de <%# DataBinder.Eval(Container.DataItem, "High")%>
et un minimum de <%# DataBinder.Eval(Container.DataItem, "Low")%> degrees
</ContentTemplate>
</speech:DataTableNavigator>
...
</form>
See Also
DataTableNavigator Class | DataTableNavigator Constructor | DataTableNavigator Members | DataTableNavigator Properties | DataTableNavigator Methods | DataTableNavigator Events | DataTableNavigator Remarks | DataTableNavigator Client Object