DataBindField Property for French (Canada)
Gets or sets the field of the DataSource property that provides the binding values of the list items. Read/write.
Usage
ASP.NET markup: | <speech:ListSelector DataBindField="..." /> |
Get value: | String = ListSelector.DataBindField; |
Set value: | ListSelector.DataBindField = String; |
Data type: | String |
Required: | No |
Remarks
The DataBindField property specifies the column in the data source that contains the value that binds to the control's SemanticItem property.
The control throws an ArgumentException if DataBindField property is specified but the data source does not contain a corresponding column.
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