I would like to know how can I retrieve an image using web service to aspx website C#? My web service code is below.
public List<byte[]> getBlueBallImageDefault()
{
string strCMD = "SELECT blueBallImage FROM CorrespondingBall WHERE objective = 0";
SqlCommand cmd = new SqlCommand(strCMD, conn);
SqlDataReader dr = cmd.ExecuteReader();
List<byte[]> blueBallImageDefaultByteList = new List<byte[]>();
while (dr.Read())
{
blueBallImageDefaultByteList.Add((byte[])dr["blueBallImage"]);
}
return blueBallImageDefaultByteList;
}
[WebMethod]
public List<byte[]> getBlueBallImageDefault()
{
List<byte[]> blueBallImageDefaultByteList = new List<byte[]>();
con.dbConnect();
blueBallImageDefaultByteList = con.getBlueBallImageDefault();
con.dbClose();
return blueBallImageDefaultByteList;
}