StateItem

StateItem

System.Web.UI (system.web.dll)sealed class

This class represents an item in the StateBag collection and is used to track changes to that item. The actual stored object is contained in the Value property. An additional piece of information is provided in the IsDirty property, which is True if the item has been changed since being saved into the StateBag collection. Changes to an item in the StateBag are saved when the ASP.NET framework calls the Control.SaveViewState( ) method.

When you retrieve an option from the StateBag collection using the default indexer StateBag.Item, you will receive the actual object. If, however, you want to enumerate through the StateBag collection using for each syntax, you should create a StateItem enumerator. You can also retrieve a StateItem object from the StateBag.Add( ) method.

public sealed class StateItem { // Public Instance Properties    public bool IsDirty{set; get; }    public object Value{set; get; } }

Returned By

StateBag.Add( )



ASP. NET in a Nutshell
ASP.NET in a Nutshell, Second Edition
ISBN: 0596005202
EAN: 2147483647
Year: 2003
Pages: 873

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net