Partager 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

<AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple := False)> _
<AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
Public NotInheritable Class SupportsAttributeMarkupAttribute _
    Inherits Attribute

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