System.Web.UI.HierarchicalDataSourceControl Class

Provides a base class for data source controls that represent hierarchical data.

See Also: HierarchicalDataSourceControl Members


[System.ComponentModel.Designer("System.Web.UI.Design.HierarchicalDataSourceDesigner, System.Design, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.IDesigner")]
public abstract class HierarchicalDataSourceControl : Control, IHierarchicalDataSource


ASP.NET supports a controls data-binding architecture that enables Web server controls to bind to data and present it in a consistent fashion. Web server controls that bind to data are called data-bound controls, and the classes that facilitate binding are called data source controls. Data source controls can represent any data source: a file, a stream, a relational database, a business object, and so on. Data source controls present data in a consistent way to data-bound controls, regardless of the source or format of the underlying data.

Data source controls that represent hierarchical data derive from the System.Web.UI.HierarchicalDataSourceControl class, while data source controls that represent lists or tables of data derive from the System.Web.UI.DataSourceControl class. The System.Web.UI.HierarchicalDataSourceControl class is the base implementation of the System.Web.UI.IHierarchicalDataSource interface, which defines a single method to retrieve hierarchical data source view objects associated with the data source control, IHierarchicalDataSource.GetHierarchicalView(string).

You can think of a data source control as the combination of the System.Web.UI.HierarchicalDataSourceControl object and its associated views on the underlying data, called data source view objects. While data source controls that represent tabular data are typically associated with only one named view, the System.Web.UI.HierarchicalDataSourceControl class supports a data source view for each level of hierarchical data that the data source control represents. The level of hierarchical data is identified by a unique hierarchical path, passed to the HierarchicalDataSourceControl.GetHierarchicalView(string) method in the viewPath parameter. Each System.Web.UI.HierarchicalDataSourceView object defines the capabilities of a data source control for the hierarchical level represented, and performs operations such as insert, update, delete, and sort.

Web server controls that derive from the System.Web.UI.WebControls.HierarchicalDataBoundControl class, such as System.Web.UI.WebControls.TreeView, use hierarchical data source controls to bind to hierarchical data.

Data source controls are implemented as controls to enable declarative persistence and to optionally permit participation in state management. Data source controls have no visual rendering, and therefore do not support themes.


Namespace: System.Web.UI
Assembly: System.Web (in System.Web.dll)
Assembly Versions:
Since: .NET 2.0