.netCHARTING v10.7 Documentation
Example 


dotnetCHARTING Namespace > Chart Class : UseSession Property
UseSession Property

Gets or sets a value indicating whether the generated image is saved
temporarily in a session variable for subsequent streaming from a helper aspx page. This option may only be used when UseFile = false.

Syntax
'Declaration
 
Public Property UseSession As Boolean
'Usage
 
Dim instance As Chart
Dim value As Boolean
 
instance.UseSession = value
 
value = instance.UseSession
public bool UseSession {get; set;}
Remarks

.netCHARTING supports streaming images directly to the browser in addition
to returning a reference to a generated image file. There are differences in
the way the control can be used between these two image return methods. When using a file reference, you are free to treat the page as you normally would, and include HTML and any other web content on the page.<br/>

Since streaming turns the page you include the control on into the actual
image file return, the browser will not also allow HTML within the same http
request. As a result url, tooltip and drilldown options will not be
enabled. Setting UseSession to true works around this issue by returning an
image reference to the same aspx page for image streaming. The image
stream is temporary stored in a session variable and an aspx page in the
temp directory streams the image to the browser, enabling the regular HTML
and image map based features to work seamlessly with the control.

NOTE: streaming of any kind (direct or through the session helper) has a large performance cost over the file based system which has build in cleanup functionlity and should be used in all possible environments. Streaming
should never be used unless your environment completely prevents write
access which is required for the file based system to operate.<br/>

Example
Chart.UseSession = true;
Chart.UseSession = true
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