i have get store the image in varbinay format in sql datatbase. i get the record in data table. record show in datatable,bt show time error occured.how can i fix the error
Error: .'fromstream parameter is not valid"
if (dt.Rows.Count > 0)
{
Byte[] MyData = new byte[0];
MyData = ((Byte[])dt.Rows[0]["Company_Logo"]);
if (MyData != null)
{
MemoryStream stream = new MemoryStream(MyData);
pbox_logo.Image = Image.FromStream(stream);
}
}