PersistenceModeAttribute Class

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)

'Declaration
<AttributeUsageAttribute(AttributeTargets.All)> _
Public NotInheritable Class PersistenceModeAttribute
	Inherits Attribute
'Usage
Dim instance As PersistenceModeAttribute

/** @attribute AttributeUsageAttribute(AttributeTargets.All) */ 
public final class PersistenceModeAttribute extends Attribute
AttributeUsageAttribute(AttributeTargets.All) 
public final class PersistenceModeAttribute extends Attribute
Not applicable.

For more information about using attributes, see Extending Metadata Using Attributes.

NoteNote:

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


  • AspNetHostingPermission  for operating in a hosted environment. Demand value: LinkDemand; Permission value: Minimal.

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 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show: