Click to See Complete Forum and Search --> : Memory Stream


jabbarsb
March 23rd, 2006, 02:34 AM
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, can you send me the code how to do this
regards jabbar

mmetzger
March 23rd, 2006, 09:41 AM
Try getting rid of the "Response.End()" line. It is likely ending the communication before the other objects are sent to the browser.