Updating ASP.NET chart asynchronously
Is there any way to update one of these charts asynchronously besides calling Chart1.SaveImage() and sending the image URL to the client-side?
If you use javascript the browser can ask if there is an update to the chart, and if there is, it could just change the url for the image, by changing the datetime on it:
<img src=myimage.aspx?datetime=884733 />
This would then get the latest chart as you send the data directly to the image tag.
This would enable the server to decide if a new image should be generated, or to use the already created one. You could also add some user info such as the current date/time to the chart before sending it out.
精彩评论