Hi all,
I'm using a second page to write dynamical generated images
into the outputstream. This avoids using tmp-files on disc.
My code-behind in the start aspx file is:
'Use second file to write into outputstream
Application("gr afix-obj") = ob
button.ImageUrl = "Grafix.asp x"
Panel.Controls. Add(button)
ob is the bitmap with the image! The file Grafix.aspx
contains only code behind:
Public Class grafix
Inherits System.Web.UI.P age
#Region " Web Form Designer Generated Code "
......
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal
e As System.EventArg s) Handles MyBase.Load
Dim ob As Bitmap = New Bitmap(830, 30)
ob = CType(Applicati on("grafix-obj"), Bitmap)
ob.Save(Respons e.OutputStream, Imaging.ImageFo rmat.Jpeg)
End Sub
End Class
I normally expect this to be working! But there is only the
'no image' sign on the imagebutton if I try.
I used the following code before, which worked well:
'Store as tmp file on disk
Dim tempfilepath As String = System.IO.Path. GetTempPath
ob.Save(tempfil epath &"temp.jpg",Ima ging.ImageForma t.Jpeg
button.ImageUrl = tempfilepath & "temp.jpg"
What is going wrong?
Thanks for each help
Jenny