Share via


SupportsAttributeMarkupAttribute class

Enables an appropriate Web Part to be serialized into page markup using standard control attribute markup.

Inheritance hierarchy

System.Object
  System.Attribute
    Microsoft.SharePoint.WebPartPages.SupportsAttributeMarkupAttribute

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

Syntax

'Declaration
<AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple := False)> _
<AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
Public NotInheritable Class SupportsAttributeMarkupAttribute _
    Inherits Attribute
'Usage
Dim instance As SupportsAttributeMarkupAttribute
[AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = false)]
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public sealed class SupportsAttributeMarkupAttribute : Attribute

Remarks

If a Web Part derives from WebPart, and does not use key features from System.Web.UI.WebControls.WebParts.WebPart, such as the System.Web.UI.WebControls.WebParts.PersonalizableAttribute, then it will be serialized into page markup as XML.

If the Web Part provides TypeConverters for all of its complex public properties then it can set this attribute to true and the Web Part will be serialized into page markup using standard control attribute markup.

Thread safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See also

Reference

SupportsAttributeMarkupAttribute members

Microsoft.SharePoint.WebPartPages namespace