System.Web.UI.StateBag Members

The members of System.Web.UI.StateBag are listed below.

See Also: Inherited members from System.Object

Public Constructors

Initializes a new instance of the System.Web.UI.StateBag class. This is the default constructor for this class.

Initializes a new instance of the System.Web.UI.StateBag class that allows stored state values to be case-insensitive.

Public Properties

[read-only]
Countint.

Gets the number of System.Web.UI.StateItem objects in the System.Web.UI.StateBag object.

default property
Item(string)object. Documentation for this section has not yet been entered.
[read-only]
KeysICollection.

Gets a collection of keys representing the items in the System.Web.UI.StateBag object.

[read-only]
ValuesICollection.

Gets a collection of the view-state values stored in the System.Web.UI.StateBag object.

Public Methods

Add(string, object) : StateItem

Adds a new System.Web.UI.StateItem object to the System.Web.UI.StateBag object. If the item already exists in the System.Web.UI.StateBag object, this method updates the value of the item.

Clear()

Removes all items from the current System.Web.UI.StateBag object.

GetEnumerator() : IDictionaryEnumerator

Returns an enumerator that iterates over all the key/value pairs of the System.Web.UI.StateItem objects stored in the System.Web.UI.StateBag object.

IsItemDirty(string) : bool

Checks a System.Web.UI.StateItem object stored in the System.Web.UI.StateBag object to evaluate whether it has been modified since the call to Control.TrackViewState.

Remove(string)

Removes the specified key/value pair from the System.Web.UI.StateBag object.

SetDirty(bool)

Sets the state of the System.Web.UI.StateBag object as well as the System.Web.SessionState.ISessionStateItemCollection.Dirty property of each of the System.Web.UI.StateItem objects contained by it.

SetItemDirty(string, bool)

Sets the System.Web.SessionState.ISessionStateItemCollection.Dirty property for the specified System.Web.UI.StateItem object in the System.Web.UI.StateBag object.

Explicitly Implemented Interface Members

IDictionary.Add

For a description of this member, see IDictionary.Add(object, object).

IDictionary.Contains

For a description of this member, see IDictionary.Contains(object).

ICollection.CopyTo

For a description of this member, see ICollection.CopyTo(Array, int).

IEnumerable.GetEnumerator

For a description of this member, see IEnumerable.GetEnumerator.

[read-only]
IDictionary.IsFixedSizebool.

For a description of this member, see IDictionary.IsFixedSize.

[read-only]
IDictionary.IsReadOnlybool.

For a description of this member, see IDictionary.IsReadOnly.

[read-only]
ICollection.IsSynchronizedbool.

For a description of this member, see ICollection.IsSynchronized.

[read-only]
System.Web.UI.IStateManager.IsTrackingViewStatebool.

Gets a value indicating whether state changes are being tracked.

IDictionary.Itemobject. Documentation for this section has not yet been entered.
System.Web.UI.IStateManager.LoadViewState

Restores the previously saved view state of the System.Web.UI.StateBag object.

IDictionary.Remove

For a description of this member, see IDictionary.Remove(object).

System.Web.UI.IStateManager.SaveViewState

Saves the changes to the System.Web.UI.StateBag object since the time the page was posted back to the server.

[read-only]
ICollection.SyncRootobject.

For a description of this member, see ICollection.SyncRoot.

System.Web.UI.IStateManager.TrackViewState

Causes the System.Web.UI.StateBag object to track changes to its state so that it can be persisted across requests.