PersistenceMode Enumeration
Collapse the table of content
Expand the table of content

PersistenceMode Enumeration


Specifies how an ASP.NET server control property or event is persisted declaratively in an .aspx or .ascx file.

Namespace:   System.Web.UI
Assembly:  System.Web (in System.Web.dll)

public enum PersistenceMode

Member nameDescription

Specifies that the property or event persists as an attribute.


Specifies that the property persists as the only inner text of the ASP.NET server control. The property value is HTML encoded. Only a string can be given this designation.


Specifies that the property persists in the ASP.NET server control as inner text. Also indicates that this property is defined as the element's default property. Only one property can be designated the default property.


Specifies that the property persists in the ASP.NET server control as a nested tag. This is commonly used for complex objects, those that have persistable properties of their own.

Legacy Code Example

The following code example demonstrates an ITemplate property that will be persisted as an inner property, as defined by applying the PersistenceModeAttribute attribute to the property's metadata.

Code snippet is not found. Confirm that the code snippet name 'System.Web.UI.PersistenceMode' is correct.

.NET Framework
Available since 1.1
Return to top
© 2015 Microsoft