asp.net.ph

HierarchicalDataBoundControl.DataSourceID Property

System.Web.UI.WebControls Namespace   HierarchicalDataBoundControl Class


Sets or retrieves the ID of the control from which a HierarchicalDataBoundControl gets its data.

Syntax


Inline <asp:hierarchicaldataboundcontrol datasourceid = strID ... >
Script HierarchicalDataBoundControl.DataSourceID [ = strID ]

Property Value


strID String specifying the ID of a control that represents the data source from which a hierarchical data-bound control retrieves its data.

The property is read/write with no default value.

Remarks

Use the DataSourceID to specify or determine the ID of a control that represents the data source from which a hierarchical data-bound control, such as the Menu and TreeView control, gets its list of data items.

A hierarchical data-bound control is associated to its data source by setting its DataSourceID property to the ID of the data source control. When the DataSourceID property is set, the data-bound control automatically binds to the data source control at run time.

NOTE: This member overrides BaseDataBoundControl.DataSourceID.

Example

The following examples demonstrate how the DataSourceID property is used to associate different hierarchical data-bound controls to a SiteMapDataSource control.

Binding a Menu Control to a SiteMapDataSource
Run Sample | View Source
Binding a TreeView Control to a SiteMapDataSource
Run Sample | View Source
See Also

HierarchicalDataBoundControl Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 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 asp.net.ph