Click here to Skip to main content
15,899,026 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

My webservice will return the bytearray.

Now,
I need to convert it into Image & i need to display that image into
GridView control.

How can i do this?

Thanks in Advance
Posted

1 solution

Check this

C# Image to Byte Array and Byte Array to Image Converter Class[^]

C#
public Image byteArrayToImage(byte[] byteArrayIn)
{
     MemoryStream ms = new MemoryStream(byteArrayIn);
     Image returnImage = Image.FromStream(ms);
     return returnImage;
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900