Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Memory Stream problem

Hello everybody,
I have developed one website on which i have to show charts on certain .aspx page (ie asp.net page) i am using System.IO.MemoryStream to write the chart object on the page on page load event but whats happening its drawing the chart on my page but all the other controls like buttons, textboxes etc are not visible on the page when i write this code its just simplying drawing the chart erasing all the controls on the page the code is as follows
sub page_load()

Dim wcEng As New ChartEngine
Dim wcCharts As New ChartCollection(wcEng)
wcEng.Charts = wcCharts
Chart1.Charts.Add(charta)
Chart1.RedrawChart()
wcCharts.Add(charta)
Dim bmp As Bitmap
Dim memStream As New System.IO.MemoryStream
bmp = wcEng.GetBitmap()
bmp.Save(memStream, System.Drawing.Imaging.ImageFormat.Png)
memStream.WriteTo(Response.OutputStream)
Response.End()

end sub

can anybody help me
regards jabbar
[1126 byte] By [jabbarsb] at [2007-11-11 8:17:57]
# 1 Re: Memory Stream problem
Your Response.end is killing all rendering. since your are creating a bitmap use an image position to upload load your image then let the program continue as normal.
sremiger at 2007-11-11 23:13:24 >
# 2 Re: Memory Stream problem
hello,
can you send me the code how to do that
regards jabbar
jabbarsb at 2007-11-11 23:14:24 >