Defines the metadata attribute that specifies how an ASP.NET server control property or event is persisted to an ASP.NET page at design time. This class cannot be inherited.
Namespace:
System.Web.UI
Assembly:
System.Web (in System.Web.dll)
Visual Basic (Declaration)
<AttributeUsageAttribute(AttributeTargets.All)> _
<AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
Public NotInheritable Class PersistenceModeAttribute _
Inherits Attribute
Dim instance As PersistenceModeAttribute
[AttributeUsageAttribute(AttributeTargets.All)]
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public sealed class PersistenceModeAttribute : Attribute
[AttributeUsageAttribute(AttributeTargets::All)]
[AspNetHostingPermissionAttribute(SecurityAction::LinkDemand, Level = AspNetHostingPermissionLevel::Minimal)]
public ref class PersistenceModeAttribute sealed : public Attribute
public final class PersistenceModeAttribute extends Attribute
For more information about using attributes, see Extending Metadata Using Attributes.
Note: |
|---|
The Web page designer in Visual Studio does not support the ResetPropertyName method that is optionally exposed by Windows Forms controls for property persistence. Server controls are serialized using methods provided by the ControlPersister class. The implementation of these methods is driven by metadata attributes such as DefaultValueAttribute, PersistenceModeAttribute, and DesignerSerializationVisibilityAttribute. |
<PersistenceMode(PersistenceMode.InnerProperty), TemplateContainer(GetType(TemplateItem))> Public Property MessageTemplate() As ITemplate
Get
Return _messageTemplate
End Get
Set(ByVal Value As ITemplate)
_messageTemplate = Value
End Set
End Property
[PersistenceMode(PersistenceMode.InnerProperty),
TemplateContainer(typeof(TemplateItem))]
public ITemplate MessageTemplate {
get {
return _messageTemplate;
}
set {
_messageTemplate = value;
}
}
System..::.Object
System..::.Attribute
System.Web.UI..::.PersistenceModeAttribute
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
.NET Framework
Supported in: 3.5, 3.0, 2.0, 1.1, 1.0
Reference