Dundas Chart for ASP.NET Send comments on this topic.
ImageUrl Property
See Also 
Dundas.Charting.WebControl Namespace > Chart Class : ImageUrl Property


Determines where an image file is saved when either image tag or input tag rendering is used.


Chart image URL. Location where chart image is saved, when image tag is used for rendering.

Syntax

Visual Basic (Declaration) 
Public Property ImageUrl As String
Visual Basic (Usage)Copy Code
Dim instance As Chart
Dim value As String
 
instance.ImageUrl = value
 
value = instance.ImageUrl
C# 
public string ImageUrl {get; set;}

Return Value

A string expression representing the URL where the image file is saved on the server.

Remarks

When rendering a chart image using the image tag method a chart image is generated and then saved to disk at the server, in a format that is determined by the ImageType property.

The URL where the image file is saved can be either absolute or relative, and the file extension that the image file has is determined by the ImageType property.

The image file can be hard-coded to always be one filename, or you can use the "#" sign to use either UIDs or a specified number of uniquely named files (Round Robin).

The following describes three ways this property can be set:

Single Filename

One temporary image file will be saved to disk if the ImageUrl property is set to one filename (e.g. Temp.jpg). Only use this method if the chart image does not frequently change. Concurrent users may end up being sent a chart image that is not the one they requested (e.g. User 1 requests a chart, but this user's image file is overwritten by User 2's file, and User 1 is then sent the chart image intended for User2).

Unique File Names using UIDS

To save image files to disk that use a UID append "#UID" after the filename. For example, setting the ImageUrl property to "Temp_#UID.jpg" and the ImageType property to "Jpeg" will result in image files with names such as "Temp_5cbfdb93-8f35-467d-8bf0-a722428cbd09", "Temp_19276-5cb8-4f55-9d8f-8fe9c542de5.jpg", etc. .

This method will ensure that users are always sent the correct chart image file, but note that these image files must be deleted manually from the server.

Round Robin (default)

This method involves a set number of uniquely named image files. Once the allowable number of image files have been created the images are overwritten, starting with the first file generated, followed by the second, etc.

The syntax is as follows: FileName#SEQ(x,y), where "x" is the allowable number of image files saved to disk and y is a time limit (in seconds) that determines whether or not a warning is inserted into the Event Log.

When a file is overwritten the File Creation date is first checked, and if the time the file has existed is less than the "y" parameter a warning is inserted into the Event Log. For example, if the ImageType property is "Jpeg" and the ImageUrl property is set to "Temp_#SEQ(300,1)" then 300 image files named "Temp_1.jpg", "Temp_2.jpg" will eventually be saved to disk once 300 users have requested a chart. When the next user requests a chart the "Temp_1.jpg" file is overwritten, and if it was created less than 1 second prior to being overwritten the warning is inserted into the Event Log. When this occurs the allowable number of files can be increased to handle the large amount of traffic occurring at the site.

It is up to the developer to determine the amount of traffic that the Web Control needs to handle.

To solve a caching issue within Internet Explorer, a GUID is applied to the image URL similar to: "ChartPic_000002.jpg?4ea19276-5cb8-4f55-9d8f-8fe9c542de5". In some cases, this fix may create other issues. To generate a chart without the GUID appended, simply use the keyword, #NOGUIDPARAM. 

For example, FileName#SEQ(x,y)#NOGUIDPARAM.

This method does not require that image files be deleted manually from the server.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also