Export (0) Print
Expand All

SPFile.GetWebPartCollection Method

NOTE: This API is now obsolete.

Use the GetLimitedWebPartManager method to return an SPLimitedWebPartManager object to manage Web Parts instead. (In Windows SharePoint Services 2.0 the GetWebPartCollection method returned the Web Part collection that is associated with the Web Parts page.)

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

[ObsoleteAttribute("Use SPFile.GetLimitedWebPartManager instead.")]
public SPWebPartCollection GetWebPartCollection(
	Storage storage
)

Parameters

storage
Type: Microsoft.SharePoint.WebPartPages.Storage

A Storage value that specifies the scope of the collection that is returned according to all or individual users of the collection.

Return Value

Type: Microsoft.SharePoint.SPWebPartCollection
An object that represents the Web Parts.

The GetWebPartCollection method does not return static Web Parts, which are hard-coded into the .aspx source of the page.

Show:
© 2014 Microsoft