IListWebPart interface
實作這個介面來建立網頁組件類別放在表單上所需要的功能。例如, ListFormWebPart和ListViewWebPart類別這兩種實作這個介面,使它們可以放置在表單上的不同區域中。
Namespace: Microsoft.SharePoint.WebPartPages
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
<AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
<AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
Public Interface IListWebPart
'用途
Dim instance As IListWebPart
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public interface IListWebPart
備註
若要個人化 Web 組件屬性, IListWebPart介面的實作中,使用PersonalizableAttribute屬性。這樣可以確保屬性儲存,並收集。共用的範圍可以讓要儲存的方式,讓所有使用者共用的屬性值的屬性。使用者範圍可讓使用者儲存自己個別的值,這個屬性。例如,在您實作IListWebPart中,請將下列屬性加入至任何IListWebPart屬性,以確保屬性儲存為檢視網頁組件的所有使用者:
[System.Web.UI.WebControls.WebParts.Personalizable(PersonalizationScope.Shared)]
使用WebBrowsableAttribute屬性來指定要顯示在 Web 瀏覽的內容編輯器網頁組件中的IListWebPart屬性。例如,在您實作IListWebPart中,請將下列屬性加入至任何IListWebPart屬性,以確保可以從 Web 瀏覽的內容編輯器網頁組件中變更屬性:
[System.Web.UI.WebControls.WebParts.WebBrowsable(true)]