System.Web.UI.StateBag.SetDirty Method

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.

Syntax

public void SetDirty (bool dirty)

Parameters

dirty
true to mark the state of the collection and its items as modified; otherwise, false.

Remarks

The StateBag.SetDirty(bool) method is used to force the collection and its contents to be serialized during a call to the System.Web.UI.StateBag.System.Web.UI.IStateManager.SaveViewState method.

Requirements

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