J
Jenny
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("grafix-obj") = ob
button.ImageUrl = "Grafix.aspx"
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.Page
#Region " Web Form Designer Generated Code "
......
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles MyBase.Load
Dim ob As Bitmap = New Bitmap(830, 30)
ob = CType(Application("grafix-obj"), Bitmap)
ob.Save(Response.OutputStream, Imaging.ImageFormat.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(tempfilepath &"temp.jpg",Imaging.ImageFormat.Jpeg
button.ImageUrl = tempfilepath & "temp.jpg"
What is going wrong?
Thanks for each help
Jenny
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("grafix-obj") = ob
button.ImageUrl = "Grafix.aspx"
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.Page
#Region " Web Form Designer Generated Code "
......
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles MyBase.Load
Dim ob As Bitmap = New Bitmap(830, 30)
ob = CType(Application("grafix-obj"), Bitmap)
ob.Save(Response.OutputStream, Imaging.ImageFormat.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(tempfilepath &"temp.jpg",Imaging.ImageFormat.Jpeg
button.ImageUrl = tempfilepath & "temp.jpg"
What is going wrong?
Thanks for each help
Jenny