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
Member | Description | |
---|---|---|
Constructor | ||
PreserveProperty | 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); |
|
Enabled | Determines whether the control preserves and restores values | |
PreservedProperties | Collection of all the preserved properties that are to be preserved/restored. Collection hold, ControlId, Property | |
StorageMode | Determines the storage mode for the control. |