title: How to populate a listview from a datatable
body: <p>I have a <code>ListView</code> and a <code>DataTable</code> and I would like to know how to populate the <code>ListView</code> from the <code>DataTable</code>.</p>
  
  <p>Here is my code: </p>
  
  <pre><code>DataTable dt = new DataTable();
  SqlConnection conn = new SqlConnection(@"connectionstring");
  SqlCommand ccmd = new SqlCommand("SELECT img FROM '" + user + "'", conn);
  conn.Open();
  
  SqlDataAdapter da = new SqlDataAdapter(ccmd);
  da.SelectCommand = ccmd;
  da.Fill(dt);
  </code></pre>