System.Web.UI.Design.WebControls.BaseDataListDesigner.GetSelectedDataSource Method

Gets the data source component from the associated control container.

Syntax

public virtual object GetSelectedDataSource ()

Returns

An object implementing an IEnumerable interface containing the design-time System.Web.UI.WebControls.BaseDataList.DataSource property of the associated control; otherwise, null if a data source is not found.

Remarks

The BaseDataListDesigner.GetSelectedDataSource method uses the System.Web.UI.Design.DesignTimeData.GetSelectedDataSource(System.ComponentModel.IComponent, string) method to construct a data source from the object that is specified by the System.Web.UI.WebControls.BaseDataList.DataSource property of the associated control derived from the System.Web.UI.WebControls.BaseDataList class.

Requirements

Namespace: System.Web.UI.Design.WebControls
Assembly: System.Design (in System.Design.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0