HeaderTemplate Property for French (Canada)
Gets or sets the name of the template that defines how the headers are played. Read/write.
Usage
ASP.NET markup: | <speech:DataTableNavigator HeaderTemplate="..." /> |
Get value: | ITemplate = DataTableNavigator.HeaderTemplate; |
Set value: | DataTableNavigator.HeaderTemplate = ITemplate; |
Data type: | ITemplate |
Required: | No; Default: Null |
Remarks
When the DataTableNavigator control processes a row of data from the DataSource property, it begins by playing a prompt that contains the names of the header fields. The HeaderTemplate property enables application authors to customize the speaking of the header prompt with additional text.
The DataTableNavigator control builds the header prompt text using the following steps:
- If the control has a PromptSelectFunction, it calls the PromptSelectFunction. If the PromptSelectFunction returns a text string, this string is played as the header prompt text.
- If the control's PromptSelectFunction does not return prompt text, the control evaluates its HeaderTemplate property. If the HeaderTemplate contains a text string, this string is played as the header prompt text.
- If the HeaderTemplate does not contain a text string, the control uses the names of the data header fields as the header prompt text. The names of the data header fields are contained in the control's DataHeaderFields property.
The header prompt text is associated with the "Header" CommandRule that is contained in the DataTableNavigator control's CommandRules property. If the "Header" CommandRule is enabled, the DataTableNavigator control will repeat the header prompt text when the user says "Header" or a synonym for "Header". If the "Header" CommandRule is disabled, the DataTableNavigator control will not recognize the "Header" command.
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 HeaderTemplate property causes the control to speak the header fields as "le temps maintenant dans Seattle, Washington." rather than as "Seattle, Washington."
<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")%> degrés.
</ContentTemplate>
</speech:DataTableNavigator>
...
</form>
See Also
DataTableNavigator Class | DataTableNavigator Constructor | DataTableNavigator Members | DataTableNavigator Properties | DataTableNavigator Methods | DataTableNavigator Events | DataTableNavigator Remarks | DataTableNavigator Client Object