Version

ViewState Property (ObjectBase)

Property to return the ViewState bag for the object. If none exist, then one is created.
Syntax
'Declaration
 
Protected ReadOnly Property ViewState As StateBag
protected StateBag ViewState {get;}
Remarks
This property should not be accessed to check for the existance of ViewState since ViewState will be created if none exists. Instead, use IsDataPossible() or IsDirty() to check if there are items in ViewState.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also