ControlPersister Class
Provides methods for persisting Web server controls at design-time.
Assembly: System.Design (in System.Design.dll)
The ControlPersister type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() ![]() | PersistControl(Control) | Gets a string of data that represents the persisted form of the specified control. |
![]() ![]() | PersistControl(Control, IDesignerHost) | Gets a string of data that represents the persisted form of the specified control, using the specified designer host. |
![]() ![]() | PersistControl(TextWriter, Control) | Outputs a string of data that represents the persisted form of the specified control to the specified TextWriter. |
![]() ![]() | PersistControl(TextWriter, Control, IDesignerHost) | Outputs a string of data that represents the persisted form of the specified control to the specified TextWriter, using the specified designer host. |
![]() ![]() | PersistInnerProperties(Object, IDesignerHost) | Gets a string of data that can persist the inner properties of the specified control. |
![]() ![]() | PersistInnerProperties(TextWriter, Object, IDesignerHost) | Outputs a string of data that can persist the inner properties of the specified control to the specified TextWriter, using the specified designer host. |
![]() ![]() | PersistTemplate(ITemplate, IDesignerHost) | Gets a string of data that represents the persisted form of the specified template. |
![]() ![]() | PersistTemplate(TextWriter, ITemplate, IDesignerHost) | Writes a string of data that represents the persisted form of the specified template to the specified TextWriter object. |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
The ControlPersister class provides methods that can persist a Control control or an ITemplate interface implementation as a string of aspx code. The implementation of these methods is driven by metadata attributes, such as the DefaultValueAttribute, PersistenceModeAttribute, and DesignerSerializationVisibilityAttribute.
Note |
|---|
The Web Forms page designer does not support the ResetPropertyName method that is optionally exposed by Microsoft Windows Forms-based controls for property persistence. |
To create a Control object or an ITemplate interface by parsing a string of control- or template-persistence data, use the ControlParser class methods.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
