WebPart.StorageKey 属性
获取 Web 部件添加到 Web 部件区域时,由 Web 部件基础结构设置的唯一标识符。
命名空间: Microsoft.SharePoint.WebPartPages
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
<BrowsableAttribute(False)> _
<WebPartStorageAttribute(Storage.None)> _
Public ReadOnly Property StorageKey As Guid
Get
用法
Dim instance As WebPart
Dim value As Guid
value = instance.StorageKey
[BrowsableAttribute(false)]
[WebPartStorageAttribute(Storage.None)]
public Guid StorageKey { get; }
属性值
类型:System.Guid
为 Web 部件添加到WebPartZone控件,Web 部件基础结构设置System.Guid值。为 Web 部件 (属性不保存在Microsoft SharePoint Foundation数据库的 web 部件表) 的WebPartZone控件之外,将值设置为Guid.Empty。
备注
不能修改StorageKey属性,因为它是 Web 部件 infrastructusre 用于读取和写入的 Web 部件的属性的唯一标识符。