User59672602 posted
Hi,
I am trying to write an image to a memorystream and then read the bytes from the memory stream and open the file with Mspaint. Below is what I have done so far. Any help would be appreciated.
Try
'MemoryStream stream = new MemorySteam();
Dim stream As New MemoryStream()
Dim fileName As String = "ChartPicture.bmp"
Me.OlapChartcsi.Save(stream, fileName)
Me.Response.Clear()
Me.Response.AppendHeader("content-disposition", "attachment; filename=" & fileName)
Me.Response.ContentType = "image/bmp"
Me.Response.BinaryWrite(stream.ToArray())
HttpContext.Current.ApplicationInstance.CompleteRequest()
Dim oProcess As Process = New System.Diagnostics.Process()
oProcess.StartInfo.FileName = "mspaint"
oProcess.Start()
Catch ex As Exception
End Try
Nina