public Stream ShowProductImageQuestion(int QuestionID)
{
string query = "";
query = "SELECT QuestionImageOne FROM QuestionMaster WHERE QuestionId = @ID";
SqlConnection connection = new SqlConnection(ConfigurationManager.AppSettings["OnlineTestWebsiteString"].ToString());
SqlCommand cmd = new SqlCommand(query, connection);
cmd.Parameters.AddWithValue("@ID", QuestionID);
connection.Open();
object img = cmd.ExecuteScalar();
try
{
return new MemoryStream((byte[])img);
}
catch
{
return null;
}
finally