Saves chart data and properties with non-default values to the given object that is derived from the TextWriter class.
Saves all properties of the chart into the text writer. By setting Content or SerializableContent/NonSerializableContent properties specific set of properties can be saved.
Visual Basic (Declaration) | |
---|---|
Public Overloads Sub Save( _ ByVal writer As TextWriter _ ) |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public void Save( TextWriter writer ) |
Parameters
- writer
-
An object derived from TextWriter (e.g. StringWriter class) used to save chart properties.
Text writer to save the data.
The following example persists the appearance view state at the client. Note that the ViewStateData property represents the actual data persisted in the web document.
Visual Basic | Copy Code |
---|---|
Imports System.IOImports Dundas.Charting.Webcontrol |
C# | Copy Code |
---|---|
using System.IO; |
By default all chart properties with non-default values (this includes data points) will be serialized when this method is called. To control what chart characteristics are serialized use the Content, SerializableContent and NonSerializableContent properties.
When using this definition the format (set by the Format property) must be XML.
If the ViewStateData property is used to persist state then this method can be used to save the serialized data to an object derived from TextWriter, which is then used to write the data to the ViewStateData property. For more information see the State Management topic (also see the sample code below).
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