共用方式為


XmlWebPart.PartStorage Property

Gets or sets data that is specific to this Web Part.

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

Syntax

'Declaration
<WebPartStorageAttribute(Storage.Personal)> _
<ResourcesAttribute("PartStorageLiteral", "Advanced", "PartStorage")> _
Public Property PartStorage As String
    Get
    Set
'Usage
Dim instance As XmlWebPart
Dim value As String

value = instance.PartStorage

instance.PartStorage = value
[WebPartStorageAttribute(Storage.Personal)]
[ResourcesAttribute("PartStorageLiteral", "Advanced", "PartStorage")]
public string PartStorage { get; set; }

Property Value

Type: System.String
String  Data that applies to this Web Part only.

Remarks

The PartStorage property is read/write. This property can be used by a Web Part to store any kind of Web Part data. For example, you can use it to store private data for individual users. This property is similar to a Tag property in Microsoft Visual Basic, and it can be used to store Web Part customization information. You can store the value for this property in XML format to maximize the amount of information that is stored. There is no maximum length for this property.

This is a Personal (per user) property.

See Also

Reference

XmlWebPart Class

XmlWebPart Members

Microsoft.SharePoint.WebPartPages Namespace