Export (0) Print
Expand All
Expand Minimize

WebPart.ExportControlledProperties property

NOTE: This API is now obsolete.

Gets or sets a value indicating whether a Web Part’s properties that are flagged as controlled properties by the Web Part developer can have their values exported in personal view.

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

[ObsoleteAttribute("Use ExportMode instead.")]
[WebPartStorageAttribute(Storage.Shared)]
public bool ExportControlledProperties { get; set; }

Property value

Type: System.Boolean
true if properties flagged as controlled properties can be exported by individual users in personalization mode; otherwise, false. The default value is false.

If the ExportControlledProperties property is true, the Web Part infrastructure allow users with a Web Part Page open in personal view to export properties that are flagged as controlled properties by the Web Part developer. If false, the infrastructure does 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 class for a property to true.

This property cannot be personalized by individual users. The value of its WebPartStorageAttribute is Storage.Shared, which specifies that the property is stored with the same value for all users. Only users with the Write web pages right can set this property. It can be set programmatically, or it can be set through the Web Part task pane in the shared view of the Web-based user interface, or by using a SharePoint Foundation–compatible HTML editor, such as SharePoint Designer.

protected override void RenderWebPart (HtmlTextWriter output)
{
    // Check to see if properties marked for controlled export can be exported.
     if (this.ExportControlledProperties == true) 
    {
        output.Write ("Properties marked for controlled export can be exported in personal view");
    }
    else 
    {
        output.Write ("Controlled export properties can only be exported in shared view");
    }
} 

Show:
© 2014 Microsoft