Hi all,
I wrote a desktop application recently. The database was SQL Server, basically I had o form that was populated by the results of my dataset. I was a jigsaw daatabase and the form would show the name of the jigsaw, how many pieces, who painted it etc. Also I had a picturebox that displayed a picture of the jigsaw which retrieved from database via this code:
Having successfully acheived this project I have now decided to start an ASP.NET version of the same project.
I have used an image control in place of the picturebox control. But the above code does not work at all. Firstly with imgPigJaw.Image I get the warning
Please help!!
Thanks, Dave.
I wrote a desktop application recently. The database was SQL Server, basically I had o form that was populated by the results of my dataset. I was a jigsaw daatabase and the form would show the name of the jigsaw, how many pieces, who painted it etc. Also I had a picturebox that displayed a picture of the jigsaw which retrieved from database via this code:
Code:
Dim arrPicture() As Byte = CType(ds.Tables(0).Rows(lnRowNumber)("Picture"), Byte())
Dim ms As New MemoryStream(arrPicture)
imgPigJaw.Image = Image.FromStream(ms)
I have used an image control in place of the picturebox control. But the above code does not work at all. Firstly with imgPigJaw.Image I get the warning
Also at Image.FromStream(ms) I get'Image' is not a member of System.Web.UI.WebControls.Image
I have played around a little hoping to wing it, but I can't find a ASP.NET alternative to convert my memory stream back to an image.'Image' is ambiguous, imported from the namespaces of types 'System.Web.UI.WebControls, System.Drawing'
Please help!!
Thanks, Dave.