Here i am converting image to binary and saving it in sqltable , i got this code from some website but
NOW I DONT KNOW THE WAY TO RETRIEVE THE BINARY DATA
FROM SQL TABLE AND CONVERT IT BACK TO IMAGE FORMAT AND DISPLAY IT IN WEBPAGE
public byte[] FileToByteArray(string FileName)
{
byte[] Buffer = null;
FileStream FileStream = new FileStream(FileName,FileMode.Open,FileAccess.Read);
BinaryReader BinaryReader = new BinaryReader(FileStream);
long TotalBytes = new FileInfo(FileName).Length;
Buffer = BinaryReader.ReadBytes((Int32)TotalBytes);
FileStream.Close();
FileStream.Dispose();
BinaryReader.Close();
return Buffer;
}