Share via


IListWebPart interface

Implement this interface to create the functionality that a Web Part class requires to be placed on a form. For example, the ListFormWebPart and ListViewWebPart classes both implement this interface so that they can be positioned in different zones on a form.

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

Syntax

'Declaration
<AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
<AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
Public Interface IListWebPart
'Usage
Dim instance As IListWebPart
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public interface IListWebPart

Remarks

To personalize the Web Part properties in your implementation of the IListWebPart interface, use the PersonalizableAttribute attribute. This ensures that the property is saved and collected. Shared scope allows the property to be saved in a way that makes it possible for all users to share the property value. User scope allows users to save their own individual values for this property. For example, in your implementation of IListWebPart, add the following attribute to any of the IListWebPart properties to ensure that the property is saved for all users that view the web part:

[System.Web.UI.WebControls.WebParts.Personalizable(PersonalizationScope.Shared)]

Use the WebBrowsableAttribute attribute to specify that an IListWebPart property be displayed in a Web-browsable property editor Web Part. For example, in your implementation of IListWebPart, add the following attribute to any of the IListWebPart properties to ensure that the property can be changed from a Web-browsable property editor Web Part:

[System.Web.UI.WebControls.WebParts.WebBrowsable(true)]

See also

Reference

IListWebPart members

Microsoft.SharePoint.WebPartPages namespace