System.Web.UI.StateItem Class

Represents an item that is saved in the System.Web.UI.StateBag class when view state information is persisted between Web requests. This class cannot be inherited.

See Also: StateItem Members


public sealed class StateItem


View state is the accumulation of a page's or an ASP.NET server control's property values and is sent to the requesting browser in a hidden field.

You can explicitly add System.Web.UI.StateItem objects to an ASP.NET server control's System.Web.UI.StateBag object using either the StateBag.Item(string) property or the StateBag.Add(string, object) method. The System.Web.UI.StateBag then tracks changes to all the items that it stores. Any changes to a System.Web.UI.StateItem object are reflected in its StateItem.IsDirty property. These changes are saved by a call to the Control.SaveViewState method during the save view state phase of server control processing, just before the control is rendered to the page. For more information, see ASP.NET Web Server Controls.


Namespace: System.Web.UI
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0,