SPWebPartManager Class

Manages all the Web Part controls, functionality, and events that occur on a webpage.

Inheritance Hierarchy

System.Object
  System.Web.UI.Control
    System.Web.UI.WebControls.WebParts.WebPartManager
      Microsoft.SharePoint.WebPartPages.SPWebPartManager

Namespace:  Microsoft.SharePoint.WebPartPages
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
<AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
Public NotInheritable Class SPWebPartManager _
    Inherits WebPartManager _
    Implements IPostBackEventHandler
'Usage
Dim instance As SPWebPartManager
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public sealed class SPWebPartManager : WebPartManager, 
    IPostBackEventHandler

Remarks

Any SharePoint page that includes Web Parts must have an instance of the SPWebPartManager on the page to manage Web Parts. This object tracks which zones each Web Part is in, connection information related to Web Parts, personalization, and page edit mode.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

SPWebPartManager Members

Microsoft.SharePoint.WebPartPages Namespace