WebPartStorageAttribute Class

Specifies how a property should be stored.


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

[AttributeUsageAttribute(AttributeTargets.Property, AllowMultiple = false)]
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public sealed class WebPartStorageAttribute : Attribute

If a WebPartStorageAttribute attribute is not specified for a property, Personal is used by default. If a WebPartStorageAttribute attribute is specified for a property but the ControlledExport property is not set, the value is presumed to be set to false.

If you are developing SharePoint 2003 Web parts, you can apply both the PersonalizableAttribute attribute and the WebPartStorageAttribute attribute to change the serialization method. However, for later versions of SharePoint, the PersonalizableAttribute attribute is the default option used to deserialize the web part before using the WebPartStorageAttribute attribute.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.