SPLimitedWebPartCollection.Item 属性 (Guid)

集合中的第一个WebPart获取具有指定的存储键。

命名空间:  Microsoft.SharePoint.WebPartPages
程序集:  Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)

语法

声明
Public ReadOnly Default Property Item ( _
    storageKey As Guid _
) As WebPart
    Get
用法
Dim instance As SPLimitedWebPartCollection
Dim storageKey As Guid
Dim value As WebPart

value = instance(storageKey)
public WebPart this[
    Guid storageKey
] { get; }

参数

  • storageKey
    类型:System.Guid

    一个代表集合中的 Web 部件位置的 GUID。

属性值

类型:System.Web.UI.WebControls.WebParts.WebPart
指定位置处的一个 Web 部件对象。

异常

异常 条件
ArgumentOutOfRangeException

集合不包含与指定storageKeyWebPart

另请参阅

引用

SPLimitedWebPartCollection 类

SPLimitedWebPartCollection 成员

Item 重载

Microsoft.SharePoint.WebPartPages 命名空间