SPLimitedWebPartCollection.Item Property (Int32)
Gets the first WebPart in the collection at the specified index.
Namespace: Microsoft.SharePoint.WebPartPages
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
Public ReadOnly Default Property Item ( _
index As Integer _
) As WebPart
Get
'Usage
Dim instance As SPLimitedWebPartCollection
Dim index As Integer
Dim value As WebPart
value = instance(index)
public WebPart this[
int index
] { get; }
Parameters
index
Type: System.Int32An integer representing the Web Part location in the collection.
Property Value
Type: System.Web.UI.WebControls.WebParts.WebPart
A Web Part object at the specified location.
Exceptions
Exception | Condition |
---|---|
ArgumentOutOfRangeException | The index parameter is less than zero or equal to or greater than Count. |
See Also
Reference
SPLimitedWebPartCollection Class