SPWebPartCollection Class

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 SPWebPartCollection class represented a collection of Web Parts.)

Inheritance Hierarchy

System.Object
  System.Collections.CollectionBase
    Microsoft.SharePoint.SPWebPartCollection

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

Syntax

<ObsoleteAttribute("Use SPLimitedWebPartManager instead.")> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
Public Class SPWebPartCollection _
    Inherits CollectionBase _
    Implements IList

Dim instance As SPWebPartCollection
[ObsoleteAttribute("Use SPLimitedWebPartManager instead.")]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public class SPWebPartCollection : CollectionBase, 
    IList

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

SPWebPartCollection Members

Microsoft.SharePoint Namespace