Hi,
While upload a image to server, convert a image to as a byte array format and in server datatypes as varbinary or use image datatype.
I attached sample code for convert a image to byte array format,
private byte[] ReadFile(string imgPath,out string imageWidth, out string imageHeight)
{
if (btnFileUpload.HasFile && (btnFileUpload.FileName.EndsWith(".jpg") || btnFileUpload.FileName.EndsWith(".jpeg")))
{
FileInfo filePath = new FileInfo(imgPath);
long fileLength = filePath.Length;
FileStream fStream = new FileStream(imgPath, FileMode.Open, FileAccess.Read);
BinaryReader bReader = new BinaryReader(fStream);
upLoadImg = bReader.ReadBytes((int)fileLength);
}
return upLoadImg;
}