共用方式為


WebPartStorageAttribute.ControlledExport property

取得或設定值,指出是否要將屬性標記為受控制的屬性。

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

Syntax

'宣告
Public Property ControlledExport As Boolean
    Get
    Set
'用途
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如果屬性會標示為受控制的匯出 ;否則, false。

備註

如果ExportControlledProperties屬性是true,基礎結構可讓使用者與網頁組件匯出已標示為的內容的個人檢視中開啟 [網頁組件會控制網頁組件開發人員的屬性。如果false,基礎結構將不會匯出值的控制屬性。

網頁組件開發人員可以藉由將WebPartStorageAttribute屬性的 [ ControlledExport ] 屬性設定為true,以標示為受控制的內容屬性。在執行階段, WebPartExportControlledProperties屬性可以用於判斷是否可以匯出控制屬性的值。

Examples

下列程式碼範例示範如何將標記為受控制的屬性的屬性的WebPartStorageAttribute的ControlledExport屬性設定。

<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;
    }
}

請參閱

參照

WebPartStorageAttribute class

WebPartStorageAttribute members

Microsoft.SharePoint.WebPartPages namespace