Class PreservePropertyControl

Control used to automatically preserve properties on a page. By calling PreserveProperty you're instructing this control to persist and then restore the value of the specified property or field of a control and have it automatically restored on the next page access.

The difference of this mechanism is that it works with ViewState off, and automatically reassigns persisted values back to the controls they belong to without any extra code. It greatly simplifies persisting values like IDs or some ViewState based values without having to use Viewstate on a page.

public class PreservePropertyControl : Control

Class Members




Adds a control to the collection. At this point only the control and property are stored.

public bool PreserveProperty(Control WebControl,     string Property)

public bool PreserveProperty(string ControlId,     string Property)


Determines whether the control preserves and restores values


Collection of all the preserved properties that are to be preserved/restored. Collection hold, ControlId, Property


Determines the storage mode for the control.


Namespace: Westwind.Web.Controls
Assembly: westwind.web.webforms.dll

© West Wind Technologies, 1996-2016 • Updated: 12/12/15
Comment or report problem with topic