SPWeb.GetWebPartCollection method
SharePoint 2013
NOTE: This API is now obsolete.
Use the GetLimitedWebPartManager method of the SPFile class to return an SPLimitedWebPartManager object to manage Web Parts instead. (In Windows SharePoint Services 2.0 the GetWebPartCollection method returned the collection of Web Parts on the page at the specified URL.)
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
[ObsoleteAttribute("Use SPWeb.GetLimitedWebPartManager instead.")] public SPWebPartCollection GetWebPartCollection( string fullOrRelativeUrl, Storage storage )
Parameters
- fullOrRelativeUrl
- Type: System.String
A string that contains the absolute URL or the relative URL for the Web Part page.
- storage
- Type: Microsoft.SharePoint.WebPartPages.Storage
An Storage value that specifies the scope of the collection that is returned, according to either all users or individual users of the collection.
Return value
Type: Microsoft.SharePoint.SPWebPartCollectionAn SPWebPartCollection object that represents the Web Parts on the Web Part page.