Groups | Blog | Home
all groups > asp.net > january 2005 >

asp.net : Image and MemoryStream


Sam
1/2/2005 10:27:17 PM
hi,
how to retrieve image file from database and display it on webform directly
using memorystream.
thanks,

Shiva
1/3/2005 1:21:49 PM
You don't have to use MemoryStream at all. Just a byte array will do. Here
is an example:
http://www.aspfree.com/c/a/ASP.NET/Retrieving-Images-from-a-Database--C---Part-II/

[quoted text, click to view]
hi,
how to retrieve image file from database and display it on webform directly
using memorystream.
thanks,


Sam
1/3/2005 7:57:02 PM
the article is great, i like the idea ..but i need to display the image in
webcontrol ..
i used dynamic image from article in :
http://msdn.microsoft.com/msdnmag/issues/04/04/CuttingEdge/default.aspx

Dim img As Byte() = rd("logo")

DynamicImage1.ImageBytes = img

but the code above, doesn't work, any idea ?

thanks,



[quoted text, click to view]

Sam
1/4/2005 9:43:57 AM
i don't get any errors, just the dynamic image webcontrol doesn't display
picture.
and yes, rd("logo") return binary data, i debug the program.
does the code work for you ?


[quoted text, click to view]

Shiva
1/4/2005 2:35:04 PM
Are you getting any specific error? Also, does rd("logo") return binary data
(image)?

[quoted text, click to view]
the article is great, i like the idea ..but i need to display the image in
webcontrol ..
i used dynamic image from article in :
http://msdn.microsoft.com/msdnmag/issues/04/04/CuttingEdge/default.aspx

Dim img As Byte() = rd("logo")

DynamicImage1.ImageBytes = img

but the code above, doesn't work, any idea ?

thanks,



[quoted text, click to view]


Sam
1/5/2005 4:00:21 PM
i don't get any errors and yes, rd("logo") return binary data.
have you tried the code by yourselft, does it work ?
thanks,


[quoted text, click to view]

AddThis Social Bookmark Button