Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
GetDataSource method
Collapse the table of content
Expand the table of content

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:
© 2015 Microsoft