title: How do you make GridView load images with a DataSet in ASP.NET 2.0?
body: <p>I have a pictures table that has the following columns:</p>
  
  <pre><code>PICTURE_ID int IDENTITY(1000,1) NOT NULL,
  CATEGORY_ID int NOT NULL,
  IMGDATA image NOT NULL,
  CAPTION1 text COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
  MIME_TYPE nchar(20) NOT NULL DEFAULT ('image/jpeg'),
  IMGTHDATA image NOT NULL
  </code></pre>
  
  <p>In my code-behind I have this:</p>
  
  <pre><code>string tableName = "CATPICS";
  SqlConnection dbConnection = new SqlConnection(connStr);
  SqlDataAdapter daCatPics = new SqlDataAdapter("SELECT TOP(3) * FROM CATEGORY_PICTURES", dbConnection);
  DataSet dsPics = new DataSet();
  daCatPics.Fill(dsPics, tableName);
  
  gvCatPics.DataSource = dsPics;
  gvCatPics.DataMember = tableName;
  gvCatPics.DataBind();
  </code></pre>
  
  <p>On the markup I pretty much have: </p>
  
  <pre><code>&lt;asp:GridView ID="gvCatPics" runat="server"&gt;&lt;/asp:GridView&gt;
  </code></pre>
  
  <p>However when the code executes, it simply ignores the two image columns (IMGDATA and IMGTHDATA). For some reason it doesn't recognize that they are image columns. Does anyone know of the simplest way of having it render the image?</p>