Export (0) Print
Expand All

StateBag Members

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

The following tables list the members exposed by the StateBag type.

  Name Description
Public method StateBag Overloaded. Initializes a new instance of the StateBag class.
Top

  Name Description
Public property Count Gets the number of StateItem objects in the StateBag object.
Public property Item Gets or sets the value of an item stored in the StateBag object.
Public property Keys Gets a collection of keys representing the items in the StateBag object.
Public property Values Gets a collection of the view-state values stored in the StateBag object.
Top

(see also Protected Methods )
  Name Description
Public method Add Adds a new StateItem object to the StateBag object. If the item already exists in the StateBag object, this method updates the value of the item.
Public method Clear Removes all items from the current StateBag object.
Public method Equals  Overloaded. Determines whether two Object instances are equal. (inherited from Object)
Public method GetEnumerator Returns an enumerator that iterates over all the key/value pairs of the StateItem objects stored in the StateBag object.
Public method GetHashCode  Serves as a hash function for a particular type. (inherited from Object)
Public method GetType  Gets the Type of the current instance. (inherited from Object)
Public method IsItemDirty Checks a StateItem object stored in the StateBag object to evaluate whether it has been modified since the call to Control.TrackViewState.
Public method Static ReferenceEquals  Determines whether the specified Object instances are the same instance. (inherited from Object)
Public method Remove Removes the specified key/value pair from the StateBag object.
Public method SetDirty Sets the state of the StateBag object as well as the Dirty property of each of the StateItem objects contained by it.
Public method SetItemDirty Sets the Dirty property for the specified StateItem object in the StateBag object.
Public method ToString  Returns a String that represents the current Object. (inherited from Object)
Top

  Name Description
Protected method Finalize  Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (inherited from Object)
Protected method MemberwiseClone  Creates a shallow copy of the current Object. (inherited from Object)
Top

  Name Description
Explicit interface implementation Method System.Collections.ICollection.CopyTo For a description of this member, see ICollection.CopyTo.
Explicit interface implementation Method System.Collections.IDictionary.Add For a description of this member, see IDictionary.Add.
Explicit interface implementation Method System.Collections.IDictionary.Contains For a description of this member, see IDictionary.Contains.
Explicit interface implementation Method System.Collections.IDictionary.Remove For a description of this member, see Remove.
Explicit interface implementation Method System.Collections.IEnumerable.GetEnumerator For a description of this member, see IEnumerable.GetEnumerator.
Explicit interface implementation Method System.Web.UI.IStateManager.LoadViewState Restores the previously saved view state of the StateBag object.
Explicit interface implementation Method System.Web.UI.IStateManager.SaveViewState Saves the changes to the StateBag object since the time the page was posted back to the server.
Explicit interface implementation Method System.Web.UI.IStateManager.TrackViewState Causes the StateBag object to track changes to its state so that it can be persisted across requests.
Explicit interface implementation Property System.Collections.ICollection.IsSynchronized For a description of this member, see ICollection.IsSynchronized.
Explicit interface implementation Property System.Collections.ICollection.SyncRoot For a description of this member, see ICollection.SyncRoot.
Explicit interface implementation Property System.Collections.IDictionary.IsFixedSize For a description of this member, see IDictionary.IsFixedSize.
Explicit interface implementation Property System.Collections.IDictionary.IsReadOnly For a description of this member, see IDictionary.IsReadOnly.
Explicit interface implementation Property System.Collections.IDictionary.Item For a description of this member, see IDictionary.Item.
Explicit interface implementation Property System.Web.UI.IStateManager.IsTrackingViewState Gets a value indicating whether state changes are being tracked.
Top

Community Additions

ADD
Show:
© 2014 Microsoft