Compartir a través de


DataSource Property for French (Canada)

  Microsoft Speech Technologies Homepage

Gets or sets the source of values that are used by the DataTableNavigator control. Read/write.

Usage

ASP.NET markup: <speech:DataTableNavigator DataSource="..." />
Get value: Object = DataTableNavigator.DataSource;
Set value: DataTableNavigator.DataSource = Object;
Data type: Object
Required: Yes

Remarks

The DataSource property is the same as that used in other ASP.NET controls. 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 (that is, its Type is not Object). To create an IList object that follows the rules of a strongly typed collection, derive from CollectionBase. To strongly type the Item property, define its default implementation as private.
  • An object that implements ITypedList.

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

The control throws an ArgumentNullException if DataSource is not specified.

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