title: Getting table from mysql database to fill datalist
body: <p>Until now I did successfully take values from database. My problem is not being able to fill data in datalist as table. My code to get simple values is the following:</p>
  
  <pre><code>try
     {
      using (OdbcConnection connection = new OdbcConnection(ConfigurationManager.ConnectionStrings["MySQLConnStr"].ConnectionString))
         {
             connection.Open();
             using (OdbcCommand command = new OdbcCommand("SELECT * FROM datas", connection))
              using (OdbcDataReader dr = command.ExecuteReader())
               {
                  while (dr.Read())
                   {
                       switch (dr["namen"].ToString())
                        {
                            case "gt": Label2.Text = dr["dest"].ToString(); break;
                            case "gp1": Image1.ImageUrl = dr["dest"].ToString(); break;
                            case "gp2": Image2.ImageUrl = dr["dest"].ToString(); break;
                            case "gp3": Image3.ImageUrl = dr["dest"].ToString(); break;
                         }
                   }
                      dr.Close();
                }
                  connection.Close();
            }
          }
          catch (Exception ex)
          {
              Response.Write("An error occured: " + ex.Message);
          }
  </code></pre>