Partager via


GetWebPartCollection Method

The GetWebPartCollection method of the SPFile class returns the Web Part collection associated with the Web Part Page.

Parameters

storage   A Microsoft.SharePoint.WebPartPages.Storage value specifying the scope of the collection returned according to all or individual users of the collection.

Return Value

A Microsoft.SharePoint.SPWebPartCollection object that represents the Web Parts.

Remarks

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

Requirements

Platforms: Microsoft Windows Server 2003

Security: Code Access Security