ControlPersister.PersistControl Method (Control)

 

Gets a string of data that represents the persisted form of the specified control.

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

Public Shared Function PersistControl (
	control As Control
) As String

Parameters

control
Type: System.Web.UI.Control

The Control to persist.

Return Value

Type: System.String

A string that represents the persisted form of the control.

This method requires an IDesignerHost implementation to work correctly. This method uses the Site of the specified control to retrieve the designer host.

' Parse the selected control.
Dim persistedData As String = ControlPersister.PersistControl( _
    controlArray(selectionForm.controlList.SelectedIndex))

.NET Framework
Available since 1.1
Return to top
Show: