asp.net.ph

StateBag Class

System.Web.UI Namespace


Manages the view state of ASP.NET server controls, including pages. This class cannot be inherited.

StateBag Class Members

Collapse   Constructors

Visibility Constructor Parameters
public StateBag ( )
public StateBag ( Boolean ignoreCase )

Collapse   Properties

Visibility Name Value Type Accessibility
public Count Int32 [ Get ]
public Item ( String key ) Object [ Get , Set ]
public Keys ICollection [ Get ]
public Values ICollection [ Get ]

Collapse   Methods

Visibility Name Parameters Return Type
public Add ( String key , Object value ) StateItem
public Clear ( ) Void
public GetEnumerator ( ) IDictionaryEnumerator
public IsItemDirty ( String key ) Boolean
public Remove ( String key ) Void
public SetDirty ( Boolean dirty ) Void
public SetItemDirty ( String key , Boolean dirty ) Void

Remarks

View state for a page or control is the cumulative propery values, or view, of that page or control. You can access this class through the Control.ViewState property.

This class is the primary storage mechanism for all HTML and Web server controls. It stores attribute/value pairs as strings associated with the control. It tracks changes to these attributes only after the method that handles the Init event is executed for a page request, and save the changes to the page's or control's view state.

You can read from this class during any stage of the control processing lifecycle, but you should not write to it while the control is rendering.

This class implements a dictionary, and you can add or remove items from it as you would any dictionary object.

Skip Navigation Links



Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph