.netCHARTING v10.5 Documentation
Example 


dotnetCHARTING Namespace > Chart Class > LoadState Method : LoadState(String,Chart) Method
A raw xml string or an xml file name to load.
The chart object that be loaded with XML data.
LoadState(String,Chart) Method
Set the chart object from the specified xml file.
Syntax
'Declaration
 
Public Overloads Sub LoadState( _
   ByVal xmlDataOrFileName As String, _
   ByVal chartObject As Chart _
) 
'Usage
 
Dim instance As Chart
Dim xmlDataOrFileName As String
Dim chartObject As Chart
 
instance.LoadState(xmlDataOrFileName, chartObject)
public void LoadState( 
   string xmlDataOrFileName,
   Chart chartObject
)

Parameters

xmlDataOrFileName
A raw xml string or an xml file name to load.
chartObject
The chart object that be loaded with XML data.
Remarks
This first parameter 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.
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/.
Chart.LoadState("c://inetpub/wwwroot/app/temp/chart.xml");
Chart.LoadState("/app/temp/chart.xml");
Chart.LoadState("chart.xml");
Chart.LoadState("c://inetpub/wwwroot/app/temp/chart.xml")
Chart.LoadState("/app/temp/chart.xml")
Chart.LoadState("chart.xml")
Requirements

Target 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

See Also