PersistenceModeAttribute Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
public ref class PersistenceModeAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.All)]
public sealed class PersistenceModeAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.All)>]
type PersistenceModeAttribute = class
inherit Attribute
Public NotInheritable Class PersistenceModeAttribute
Inherits Attribute
- Inheritance
- Attributes
[PersistenceMode(PersistenceMode.InnerProperty),
TemplateContainer(typeof(TemplateItem))]
public ITemplate MessageTemplate {
get {
return _messageTemplate;
}
set {
_messageTemplate = value;
}
}
<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
For more information about using attributes, see Attributes.
Nota
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.
Persistence |
Initializes a new instance of the PersistenceModeAttribute class. |
Attribute |
Specifies that the property or event persists in the opening tag of the server control as an attribute. This field is read-only. |
Default |
Specifies the default type for the PersistenceModeAttribute class. The default is |
Encoded |
Specifies that a property is HTML-encoded and persists as the only inner content of the ASP.NET server control. This field is read-only. |
Inner |
Specifies that a property persists as the only inner content of the ASP.NET server control. This field is read-only. |
Inner |
Specifies that the property persists as a nested tag within the opening and closing tags of the server control. This field is read-only. |
Mode |
Gets the current value of the PersistenceMode enumeration. |
Type |
When implemented in a derived class, gets a unique identifier for this Attribute. (Inherited from Attribute) |
Equals(Object) |
Compares the PersistenceModeAttribute object against another object. |
Get |
Provides a hash value for a PersistenceModeAttribute attribute. |
Get |
Gets the Type of the current instance. (Inherited from Object) |
Is |
Indicates whether the PersistenceModeAttribute object is of the default type. |
Match(Object) |
When overridden in a derived class, returns a value that indicates whether this instance equals a specified object. (Inherited from Attribute) |
Memberwise |
Creates a shallow copy of the current Object. (Inherited from Object) |
To |
Returns a string that represents the current object. (Inherited from Object) |
_Attribute. |
Maps a set of names to a corresponding set of dispatch identifiers. (Inherited from Attribute) |
_Attribute. |
Retrieves the type information for an object, which can be used to get the type information for an interface. (Inherited from Attribute) |
_Attribute. |
Retrieves the number of type information interfaces that an object provides (either 0 or 1). (Inherited from Attribute) |
_Attribute. |
Provides access to properties and methods exposed by an object. (Inherited from Attribute) |
Prodotto | Versioni |
---|---|
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Feedback su .NET
.NET è un progetto di open source. Selezionare un collegamento per fornire feedback: