I need to pass a web teechart in a stream from one app to another, I can't find a method to save the web teechart to a stream. Is it posible?
Could you give an example of how to save to and load from a stream a web teechart?
thank you
Streaming WEB teechart
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Hermes,
Yes, you can do something like this:
Yes, you can do something like this:
Code: Select all
protected void Button1_Click(object sender, EventArgs e)
{
System.IO.MemoryStream stream = new System.IO.MemoryStream();
WebChart1.Chart.Export.Template.Save(stream);
Session.Add("ch1", stream);
}
protected void Button2_Click(object sender, EventArgs e)
{
WebChart1.Chart.Series.RemoveAllSeries();
}
protected void Button3_Click(object sender, EventArgs e)
{
System.IO.MemoryStream stream = new System.IO.MemoryStream();
stream = (System.IO.MemoryStream)Session["ch1"];
stream.Position = 0;
WebChart1.Chart.Import.Template.Load(stream);
stream.Close();
}
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |