ControlPersister.PersistControl Method (Control, IDesignerHost)

 

Gets a string of data that represents the persisted form of the specified control, using the specified designer host.

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

public static string PersistControl(
	Control control,
	IDesignerHost host
)

Parameters

control
Type: System.Web.UI.Control

The Control to persist.

host
Type: System.ComponentModel.Design.IDesignerHost

An IDesignerHost that is the designer host for the control.

Return Value

Type: System.String

A string that represents the persisted form of the control.

This method requires an IDesignerHost implementation to work correctly.

// Parse the selected control into a persistence string.
string persistedData = ControlPersister.PersistControl(
    controlArray[selectionForm.controlList.SelectedIndex]);

.NET Framework
Available since 1.1
Return to top
Show: