WebPartStorageAttribute.ControlledExport property

Gets or sets a value indicating whether the property is marked as a controlled property.

Namespace:  Microsoft.SharePoint.WebPartPages
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Property ControlledExport As Boolean
    Get
    Set
'Usage
Dim instance As WebPartStorageAttribute
Dim value As Boolean

value = instance.ControlledExport

instance.ControlledExport = value
public bool ControlledExport { get; set; }

Property value

Type: System.Boolean
true if property is flagged for controlled export; otherwise, false.

Remarks

If the ExportControlledProperties property is true, the Web Part infrastructure will allow users with a Web Part Page open in Personal View to export properties that have been flagged as controlled properties by the Web Part developer. If false, the infrastructure will not export the values of controlled properties.

A Web Part developer can flag properties as controlled properties by setting the ControlledExport property of the WebPartStorageAttribute for a property to true. At run time, the ExportControlledProperties property of the WebPart can be used to determine whether the values of controlled properties can be exported.

Examples

The following code example shows how to set the ControlledExport property of WebPartStorageAttribute to mark a property as a controlled property.

<WebPartStorage(Storage.Personal, ControlledExport := True), DefaultValue(0), Browsable(True), Bindable(True), XmlElement("Controlled_PersonalProperty", [Namespace] := "mycompany.com:personalproperty")>  _
 Public Property PersonalInteger() As Integer
    Get
       Return perUser
    End Get
    Set
       perUser = value
    End Set
 End Property
[WebPartStorage (Storage.Personal, ControlledExport=true)]
[DefaultValue (0)]
[Browsable (true)]
[Bindable (true)]
[XmlElement("Controlled_PersonalProperty", Namespace="mycompany.com:personalproperty")]
public int PersonalInteger 
{
    get 
    {
        return perUser;
    }
    set 
    {
        perUser = value;
    }
}

See also

Reference

WebPartStorageAttribute class

WebPartStorageAttribute members

Microsoft.SharePoint.WebPartPages namespace