편집

다음을 통해 공유


HierarchicalDataBoundControl.GetDataSource Method

Definition

Retrieves the IHierarchicalDataSource that the data-bound control is associated with, if any.

protected:
 virtual System::Web::UI::IHierarchicalDataSource ^ GetDataSource();
protected virtual System.Web.UI.IHierarchicalDataSource GetDataSource ();
abstract member GetDataSource : unit -> System.Web.UI.IHierarchicalDataSource
override this.GetDataSource : unit -> System.Web.UI.IHierarchicalDataSource
Protected Overridable Function GetDataSource () As IHierarchicalDataSource

Returns

An IHierarchicalDataSource instance that represents the data source identified by the DataSourceID property.

Exceptions

The data source control identified by the DataSourceID property does not exist in the current container.

-or-

The data source control identified by the DataSourceID property does not implement the IHierarchicalDataSource interface.

Remarks

The GetData method calls the GetDataSource method internally.

Applies to

See also