从数据库获取图像并将其放入图像查看器中
问题描述:
有人可以告诉我如何从db中获取图像并将其放在asp.net中的图像查看器中.
感谢
can somebody tells me how to take images from db and put them in image viewer in asp.net.
thanks
答
try
{
MemoryStream mStream=new MemoryStream(images byte[]);
I
mage image=Image.FromStream(mStream);
}
catch{}
检查以下文章.
http://www.dotnettutorials.com/tutorials/database/save-retrieve-image- cs.aspx [ ^ ]
Check the below article.
http://www.dotnettutorials.com/tutorials/database/save-retrieve-image-cs.aspx[^]