title: populate dropdown list from a list of objects
body: <p>In an attempt of building a 3-tier architecture c# asp.net application, I've started building a class that is database which is used for the connecting to the database, another class that is City which has a method for each column in the table cities, and a Cities class in which I have the GetCities method that creates a list of City objects and then use the DataSource wizard to set the control to use the data from GetCities(). 
  All I get is blanks in the dropdown list. Any idea why? </p>
  
  <pre><code>        public List&lt;City&gt; GetCities()
      {
          List&lt;City&gt; cities = new List&lt;City&gt;();
          Database db = new Database();
          SqlConnection conn = db.GetConnection();
          String sql = "SELECT * FROM CITIES";
          SqlCommand cmd = new SqlCommand(sql, conn);
          SqlDataReader reader = cmd.ExecuteReader();
  
          while (reader.Read())
          {
              City c = new City(reader.GetInt32(0), reader.GetString(1).ToString());
              cities.Add(c);
          }
  
          db.CloseConnection();
          return cities;
      }
  </code></pre>
  
  <p>thanks</p>