dotnetCHARTING Send comments on this topic.
LoadState(String,Boolean) Method
See Also  Example
dotnetCHARTING Namespace > Chart Class > LoadState Method : LoadState(String,Boolean) Method


xmlDataOrFileName
A raw xml string or an xml file name to load.
clear
Determine whether clear the chart object before loading the data.
Imports a chart object from the specified xml file.

Syntax

Visual Basic (Declaration) 
Public Overloads Function LoadState( _
   ByVal xmlDataOrFileName As String, _
   ByVal clear As Boolean _
) As Object
Visual Basic (Usage)Copy Code
Dim instance As Chart
Dim xmlDataOrFileName As String
Dim clear As Boolean
Dim value As Object
 
value = instance.LoadState(xmlDataOrFileName, clear)
C# 
public object LoadState( 
   string xmlDataOrFileName,
   bool clear
)

Parameters

xmlDataOrFileName
A raw xml string or an xml file name to load.
clear
Determine whether clear the chart object before loading the data.

Return Value

A chart object.

Example

This examples demonstrate different ways of accessing the same xml file in temp directory: 'c:/inetpub/wwwroot/app/temp/Chart.xml' when the applications is located in ...wwwroot/app. when started with '/' the folder resets to c:/inetpub/wwwroot/.
C#Copy Code
Chart.LoadState("c://inetpub/wwwroot/app/temp/chart.xml");
Chart.LoadState(
"/app/temp/chart.xml");
Chart.LoadState(
"chart.xml");
    
Visual BasicCopy Code
Chart.LoadState("c://inetpub/wwwroot/app/temp/chart.xml")
Chart.LoadState("/app/temp/chart.xml")
Chart.LoadState("chart.xml")

Remarks

This property takes either a raw xml string or an xml file name. For an xml file name it takes either an absolute path 'c:/inetpub/wwwroot/app/chart.xml', a physical UNC path ('\\myUncPath\cahrt.xml'), a relative path ('temp/chart.xml',) or when started with '/' a relative path from c:/inetpub/wwwroot/ ('/app/chart.xml), or only a file name 'chart.xml' in the temp directory.

See Also

© 2018 All Rights Reserved.