Compartir a través de


DataMember Property for French (Canada)

  Microsoft Speech Technologies Homepage

Gets or sets a data member from a multimember DataSource object. Read/write.

Usage

ASP.NET markup: <speech:DataTableNavigator DataMember="..." />
Get value: String = DataTableNavigator.DataMember;
Set value: DataTableNavigator.DataMember = String;
Data type: String
Required: No; Default: Null

Remarks

Use the DataMember property to specify a member from a multimember data source to bind to the list control. For example, if the DataSource property specifies a data source with more than one table, use the DataMember property to specify the table. For more information about ASP.NET data binding, see Accessing Data with ASP.NET.

The resolved data source (the DataSource and DataMember properties) must be of one of the following types:

  • An array
  • An object that implements IList and has a strongly-typed Item property. To strongly type the Item property, define its default implementation as private. To create an IList object that follows the rules of a strongly typed collection, derive from CollectionBase.
  • An object that implements ITypedList.

For more information, see the section titled Generic Collection Types in the .NET Framework Developer's Guide.

Example

The following example is adapted from the Speech Application SDK TableNavigation sample.

<form id="Form1" method="post" runat="server">
  ...
  <speech:DataTableNavigator id="Navigator1" runat="server" 
    DataSource="<%# dataSet11 %>"
    DataMember="CityInfo" 
    InitialTimeout="3000" 
    ShortInitialTimeout="500"
    MaxTimeout="30000" 
    DataContentFields="maximum,minimum,conditions"     
    QuestionPrompt="prochaine commande?" 
    PromptSelectFunction="promptSelectFunction" 
    DataHeaderFields="City"     
    SemanticItem="siDataTableNavigator">
    <CommandRules>
      <speech:CommandRule Type="First"></speech:CommandRule>
      <speech:CommandRule Type="Last"></speech:CommandRule>
      <speech:CommandRule Type="Exit"></speech:CommandRule>
      <speech:CommandRule Type="Next"></speech:CommandRule>
      <speech:CommandRule Type="Previous"></speech:CommandRule>
      <speech:CommandRule Type="Select" Active="False"></speech:CommandRule>
      <speech:CommandRule Type="Header" Active="False"></speech:CommandRule>
      <speech:CommandRule Type="Read"></speech:CommandRule>
    </CommandRules>
  </speech:DataTableNavigator>
  ...
</form>

See Also

DataTableNavigator Class | DataTableNavigator Constructor | DataTableNavigator Members | DataTableNavigator Properties | DataTableNavigator Methods | DataTableNavigator Events | DataTableNavigator Remarks | DataTableNavigator Client Object