| |||||||||||||||||||
DATASRC Attribute | dataSrc PropertyHTML Elements/DHTML Objects Element Attributes Sets or retrieves the source of the data for data binding. Syntax
Possible Values
The property is read/write with no default value. RemarksBoth tabular and single-valued data consumers use the dataSrc property to specify a binding. The property takes a string that corresponds to the unique identifier 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. When the dataSrc property is applied to a TABLE, any contained single-valued objects for which an associated dataFld property is specified are repeated for each record in the supplied data set. To complete the binding, the binding agent interrogates the enclosing TABLE for its data source. A tabular data consumer contained within another tabular data consumer ( TABLE ) must specify an explicit dataSrc. The property can be set at design time and at run time. At design time, use the corresponding DATASRC attribute. ExampleIn the following example, a text box is bound to the customer_name field of a data source object with an ID of customer. Because the text box is located within a data-bound TABLE, the text box is repeated to display each of the records in the data source. <table DATASRC="#customer"> <tr> <td><input type=TEXT DATAFLD="customer_name"></td> </tr> </table> |
| ||||||||||||||||||
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support aspxtreme