DataTextField Property for French (Canada)
Gets or sets the field of the DataSource property that provides the grammar for each item in the list. Read/write.
Usage
ASP.NET markup: | <speech:ListSelector DataTextField="..." /> |
Get value: | String = ListSelector.DataTextField; |
Set value: | ListSelector.DataTextField = String; |
Data type: | String |
Required: | Yes |
Remarks
The DataTextField property specifies the column in the data source that contains the data elements that users can speak in order to select an item. The elements stored in that column must be pipe-delimited strings. Each synonym is a possible way of selecting a value.
The control throws an ArgumentException if DataTextField is specified but the data source does not contain a corresponding column, or if a synonym can be used to select more than one value.
Example
In the following example, the DataTextField specifies that users select an employee by last name, and the DataBindField specifies that the control returns the employee's telephone extension.
<form id="Form1" method="post" runat="server">
...
<speech:semanticmap ID="SemanticMap1" runat="server">
<speech:SemanticItem ID="SemanticItem1" runat="server" >
</speech:SemanticItem>
</speech:semanticmap>
<speech:ListSelector ID=ListSelector1 runat="server"
SemanticItem="SemanticItem1"
QuestionPrompt="a quel employé voulez-vous parler?"
DataSource="<%# CorpData %>"
DataMember="Employee"
DataTextField="LastName"
DataBindField="PhoneExt"
<GrammarTemplate>
<%# DataBinder.Eval(Container.DataItem, "FirstName") %>
|
<%# DataBinder.Eval(Container.DataItem, "LastName") %>
|
<%# DataBinder.Eval(Container.DataItem, "FirstName") %>
<%# DataBinder.Eval(Container.DataItem, "LastName") %>
</GrammarTemplate>
FirstInitialTimeout="0">
</speech:ListSelector>
...
</form>
See Also
ListSelector Class | ListSelector Constructor | ListSelector Members | ListSelector Properties | ListSelector Methods | ListSelector Events | ListSelector Remarks | ListSelector Client Object