Gets or sets the user-defined view state of the control.
User defined control state data in XML format.
Visual Basic (Declaration) | |
---|---|
Public Property ViewStateData As String |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public string ViewStateData {get; set;} |
Return Value
A string value that represents the view state of the control, which is embedded in the web document at the client.
The following example manages the state of the control, and the user-defined view state consists of the chart's appearance properties.
Visual Basic | Copy Code |
---|---|
Imports System.IOImports Dundas.Charting.Webcontrol |
C# | Copy Code |
---|---|
using System.IO; |
This property allows for greater flexibility when specifying what data to persist at the client, as compared to using the ViewStateContent property.
When implementing user-defined view state it is up to the developer to set the view state, as well as utilize the view state when a postback occurs.
The Save and Load methods of the Serializer object may optionally be used to set the view state, as well as load the view state when a postback occurs. See the sample code below for an example of this.
For greater simplicity when specifying what chart state to be saved use the ViewStateContent property, which can be set to just data, visual appearance properties or both.
To enable state management set the EnableViewState property to true.
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family