This documentation is archived and is not being maintained.
StateBag Methods
Visual Studio 2008
The StateBag type exposes the following members.
| Name | Description | |
|---|---|---|
|
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. |
|
Clear | Removes all items from the current StateBag object. |
|
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
|
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
|
GetEnumerator | Returns an enumerator that iterates over all the key/value pairs of the StateItem objects stored in the StateBag object. |
|
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
|
GetType | Gets the type of the current instance. (Inherited from Object.) |
|
IsItemDirty | Checks a StateItem object stored in the StateBag object to evaluate whether it has been modified since the call to Control::TrackViewState. |
|
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
|
Remove | Removes the specified key/value pair from the StateBag object. |
|
SetDirty | Sets the state of the StateBag object as well as the Dirty property of each of the StateItem objects contained by it. |
|
SetItemDirty | Sets the Dirty property for the specified StateItem object in the StateBag object. |
|
ToString | Returns a string that represents the current object. (Inherited from Object.) |
| Name | Description | |
|---|---|---|
|
AsQueryable | Converts an IEnumerable to an IQueryable. (Defined by Queryable.) |
|
Cast | Converts the elements of an IEnumerable to the specified type. (Defined by Enumerable.) |
|
OfType | Filters the elements of an IEnumerable based on a specified type. (Defined by Enumerable.) |
| Name | Description | |
|---|---|---|
|
IDictionary::Add | For a description of this member, see IDictionary::Add. |
|
IDictionary::Contains | For a description of this member, see IDictionary::Contains. |
|
ICollection::CopyTo | For a description of this member, see ICollection::CopyTo. |
|
IEnumerable::GetEnumerator | For a description of this member, see IEnumerable::GetEnumerator. |
|
IStateManager::LoadViewState | Restores the previously saved view state of the StateBag object. |
|
IDictionary::Remove | For a description of this member, see Remove. |
|
IStateManager::SaveViewState | Saves the changes to the StateBag object since the time the page was posted back to the server. |
|
IStateManager::TrackViewState | Causes the StateBag object to track changes to its state so that it can be persisted across requests. |
Show: