dataSrcdataSrc*
*Contents  *Index  *Topic Contents
*Previous Topic: dataPageSize
*Next Topic: defaultCharset

dataSrc

Description

Specifies the source of the data for databinding.

Syntax

object.dataSrc

Remarks

Both tabular and single-valued data consumers use the dataSrc property to specify a binding. The property takes a string that corresponds to the unique ID of a data source object (DSO) on the page.

When the dataSrc property is used for tabular data binding, it specifies that the entire contents of the table be repeated once for each record from the data set.

The dataSrc property can be inherited by the elements contained in a repeated TABLE. This behavior occurs when an element within a TABLE when that element only specifies a dataFld attribute. To complete the binding, the binding agent interrogates the enclosing TABLE for its data source. This inheritance behavior holds only for single-valued consumers. Tabular data consumers (TABLE) must specify an explicit dataSrc.

The property can be set at run time. At design time it can be set through the corresponding DATASRC attribute.

Example

In the following example, the intrinsic text box is bound to the customer name of the current row of the data source control with the ID "#customer_source", and the contents of the table, in this case <TR>, will be repeated once for each record in the set of tabular data.

<TABLE DATASRC="#customer_source"> 
    <TR>
        <TD><INPUT TYPE=TEXTBOX DATAFLD="customer_name">
</TABLE>

Applies To

A, APPLET, BODY BUTTON, DIV, FRAME, IFRAME, IMG, INPUT, LABEL, MARQUEE, OBJECT, SELECT, SPAN, TABLE, TEXTAREA


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.