WebPart.ExportControlledProperties property
NOTE: This API is now obsolete.
取得或設定一個值,指出所網頁組件開發人員標示為控制屬性的網頁組件屬性是否可以有個人檢視中匯出其值。
Namespace: Microsoft.SharePoint.WebPartPages
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
<ObsoleteAttribute("Use ExportMode instead.")> _
<WebPartStorageAttribute(Storage.Shared)> _
Public Property ExportControlledProperties As Boolean
Get
Set
'用途
Dim instance As WebPart
Dim value As Boolean
value = instance.ExportControlledProperties
instance.ExportControlledProperties = value
[ObsoleteAttribute("Use ExportMode instead.")]
[WebPartStorageAttribute(Storage.Shared)]
public bool ExportControlledProperties { get; set; }
Property value
Type: System.Boolean
true如果屬性標示為個人化模式 ; 在個別使用者可以匯出控制的屬性否則,請false。預設值為false。
備註
trueExportControlledProperties屬性時,網頁組件基礎結構會允許使用標示的內容匯出為網頁組件開發人員的控制屬性在個人檢視中開啟網頁組件頁面的使用者。如果false、 基礎結構不會匯出控制屬性的值。
網頁組件開發人員可以藉由將屬性的WebPartStorageAttribute類別ControlledExport屬性設定為true標幟屬性為控制屬性。
這個屬性無法依個別使用者個人化。WebPartStorageAttribute其值為Storage.Shared,這會指定屬性會儲存具有相同值的所有使用者。僅限具有寫入網頁] 權限的使用者可以設定這個屬性。以程式設計方式設定,或者它可以設定透過 [網頁組件] 工作窗格,在 [共用] 檢視的 Web 型使用者介面中,或使用SharePoint Foundation– 相容的 HTML 編輯器,例如SharePoint Designer。
Examples
Overloads Protected Overrides Sub RenderWebPart(output As HtmlTextWriter)
' Check to see if properties marked for controlled export can be exported.
If Me.ExportControlledProperties = True Then
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")
End If
End Sub
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");
}
}