Chart.EnableViewState Property (System.Web.UI.DataVisualization.Charting)

Switch View :
ScriptFree
.NET Framework Class Library
Chart.EnableViewState Property

Gets or sets a flag that determines whether state management is enabled.

Namespace:  System.Web.UI.DataVisualization.Charting
Assembly:  System.Web.DataVisualization (in System.Web.DataVisualization.dll)
Syntax

Visual Basic
<BindableAttribute(True)> _
<PersistenceModeAttribute(PersistenceMode.Attribute)> _
Public Overrides Property EnableViewState As Boolean
	Get
	Set
C#
[BindableAttribute(true)]
[PersistenceModeAttribute(PersistenceMode.Attribute)]
public override bool EnableViewState { get; set; }
Visual C++
[BindableAttribute(true)]
[PersistenceModeAttribute(PersistenceMode::Attribute)]
public:
virtual property bool EnableViewState {
	bool get () override;
	void set (bool value) override;
}
F#
[<BindableAttribute(true)>]
[<PersistenceModeAttribute(PersistenceMode.Attribute)>]
abstract EnableViewState : bool with get, set
[<BindableAttribute(true)>]
[<PersistenceModeAttribute(PersistenceMode.Attribute)>]
override EnableViewState : bool with get, set
ASP.NET
<asp:Chart EnableViewState="True|False" />

Property Value

Type: System.Boolean
True if state management is enabled, otherwise false. The default value is false.
Remarks

Set this property to true to enable state management for the Chart control.

The view state that is saved is determined by either the ViewStateContent or ViewStateData properties.

Note Note

This property must be set prior to the Page_Load (the Page_Init or the constructor will work) or it will have no effect.

For more information consult the Visual Studio documentation that discusses view state or state management.

Version Information

.NET Framework

Supported in: 4
Platforms

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

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
See Also

Reference