title: How to display binary images into a gridview in ASP.NET using C#?
body: <p>I want to display binary images into a gridview named 'gvExistedCharacter'. I did research about it and many of them suggested to use a handler. However, I have no idea how can I do about it.</p>
  
  <p>FYI: The datatype of the image in the database is image and named 'blueBallImage'. I also want to display its level which is int in the same gridview.</p>
  
  <p>I have tried</p>
  
  <pre><code>    SqlConnection con = new SqlConnection(@"Data Source=localhost;Initial Catalog=MyCloudGames;Integrated Security=True");
  
      SqlCommand cmd = new SqlCommand("Select blueBallImage FROM CorrespondingBall", con);
      cmd.CommandType = System.Data.CommandType.Text;
      cmd.Connection = con;
  
      SqlParameter ImageID = new SqlParameter("@characterID", System.Data.SqlDbType.Int);
      ImageID.Value = context.Request.QueryString["characterID"];
      cmd.Parameters.Add(ImageID);
      con.Open();
      SqlDataReader dReader = cmd.ExecuteReader();
      dReader.Read();
      context.Response.BinaryWrite((byte[])dReader["Image"]);
      dReader.Close();
      con.Close();
  </code></pre>
  
  <p>I received an error <strong>"The parameterized query '(@characterID int)Select blueBallImage FROM CorrespondingBall' expects the parameter '@characterID', which was not supplied."</strong></p>