SPFile.GetLimitedWebPartManager method

Returns the Web Part manager that is associated with the Web Parts page.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

public SPLimitedWebPartManager GetLimitedWebPartManager(
	PersonalizationScope scope


Type: System.Web.UI.WebControls.WebParts.PersonalizationScope

A System.Web.UI.WebControls.WebParts.PersonalizationScope value that specifies either Shared, meaning that personalization data applies to all users and can be saved, or User, meaning that both user-specific personalization data, and personalization data that applies to all users, is loaded for controls on the page, but that only user-specific data can be saved.

Return value

Type: Microsoft.SharePoint.WebPartPages.SPLimitedWebPartManager
An SPLimitedWebPartManager object that represents the Web Part manager.

Calling the GetLimitedWebPartManager method on a non-.aspx page throws an exception.