System.Web.UI.WebControls.HierarchicalDataBoundControl.ValidateDataSource Method

Verifies that the object a data-bound control binds to is one it can work with.

Syntax

protected override void ValidateDataSource (object dataSource)

Parameters

dataSource
An object set to the BaseDataBoundControl.DataSource property.

Remarks

The HierarchicalDataBoundControl.ValidateDataSource(object) method is called only in the System.Web.UI.WebControls.BaseDataBoundControl class's mutator (setter) for the BaseDataBoundControl.DataSource property. The System.Web.UI.WebControls.HierarchicalDataBoundControl class checks the type of the object that is set for the BaseDataBoundControl.DataSource property to ensure that it is an instance of the System.Web.UI.IHierarchicalEnumerable or System.Web.UI.IHierarchicalDataSource interfaces.

Requirements

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