title: How to display the multiple rows of images in gridview from sql table
body: <p>I have asp.net Gridview control, In that I'm going to show the two columns one is text field and another one is image field. The grid should be expandable and should show the all the images. When i run the page all the rows images are showing the same one. How to resolve this issue? </p>
  
  <p>![Grid view results][1]</p>
  
  <p>I have used the Imagehandler file</p>
  
  <pre><code>     SqlConnection conn = new SqlConnection(connString);
       string sqlsts = "SELECT us.name, us.image from userdetails as us where us.user_id in (select user_id from user_team where team_id  in (select team_id from teaminfo where teamname='" + team + "'))";
       SqlCommand command = new SqlCommand(sqlsts, conn);
       conn.Open();
       DataTable dtst = new DataTable();
       SqlDataAdapter adp = new SqlDataAdapter(sqlsts, conn);
       adp.Fill(dtst);
       int roc = dtst.Rows.Count;
       int coc = dtst.Columns.Count;
       for (int i = 0; i &lt; roc; i++)
       {
           Byte[] imageData = (Byte[])dtst.Rows[i]["image"];
           context.Response.BinaryWrite((Byte[])dtst.Rows[i]["image"]);
           context.Response.ContentType = "image/jpeg";
           context.Response.End();
        }
  </code></pre>