开发者

How to convert byte array to image and display in datagrid?

I have made a sql database using sql server. This database include images. When I display this database in a datagrid, byte[]array displays in the image column. How do I convert from a byte array back to an image and then d开发者_运维知识库isplay that image in the datagrid? Any help or tutorials are appreciated. thanks


Try

 MemoryStream ms = new MemoryStream(imageBytes);
 Image image= Image.FromStream(ms);


take a look a this tutorial:

http://www.beansoftware.com/ASP.NET-Tutorials/Images-Database.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜