Export (0) Print
Expand All
Expand Minimize

DataFormWebPart.GetDataSource method

Gets the data source that the DataFormWebPart is displaying data for.

Namespace:  Microsoft.SharePoint.WebPartPages
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

public virtual IDataSource GetDataSource()

Return value

Type: System.Web.UI.IDataSource
The data source that the DataFormWebPart is displaying data for.

This method gets the data source using the DataSourceID.

This method returns the first element in DataSources if the DataSourceID is an empty string.

This method throws an exception if a control with DataSourceID cannot be found or the control is not an IDataSource.

Show:
© 2014 Microsoft