Export (0) Print
Expand All

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)

[AttributeUsageAttribute(AttributeTargets.All)] 
public sealed class PersistenceModeAttribute : Attribute
/** @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(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 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:
© 2014 Microsoft