DesignTimeData.GetSelectedDataSource Method (IComponent, String)

 

Gets a data source selected by name in the design host, represented by the specified component's site property and identified by the specified data source name.

Namespace:   System.Web.UI.Design
Assembly:  System.Design (in System.Design.dll)

Public Shared Function GetSelectedDataSource (
	component As IComponent,
	dataSource As String
) As Object

Parameters

component
Type: System.ComponentModel.IComponent

The IComponent object that contains the data source.

dataSource
Type: System.String

The name of the data source to retrieve.

Return Value

Type: System.Object

An object implementing either IListSource or IEnumerable representing the selected data source, or null if the data source or the designer host could not be accessed.

.NET Framework
Available since 1.1
Return to top
Show: