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)
Available in Sandboxed Solutions: No
Syntax
'Declaration
Public Overridable Function GetDataSource As IDataSource
'Usage
Dim instance As DataFormWebPart
Dim returnValue As IDataSource
returnValue = instance.GetDataSource()
public virtual IDataSource GetDataSource()
Return Value
Type: System.Web.UI.IDataSource
The data source that the DataFormWebPart is displaying data for.
Remarks
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.