title: Dropdown list from db, how to combine columns for DataTextField?
body: <p>I have a dropdown list that gets populated from a datatabase. I have it working when wanting to display only the firstname in the DataTextField of the dropdown. But if i want to display 2 fields, firstname and lastname, then it throws an error. Why is this not working or how can i get it to work?</p>
  
  <pre><code>SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ConString"].ConnectionString);
  SqlCommand cmd = new SqlCommand("SELECT * FROM tbl_customers", con);
  DataSet ds = new DataSet();
  SqlDataAdapter da = new SqlDataAdapter(cmd);
  con.Open();
  da.Fill(ds, "Customers");
  CustomerList.DataSource = ds.Tables[0];
  CustomerList.DataTextField = "FirstName" + " " + "LastName";
  CustomerList.DataValueField = "CID";
  CustomerList.DataBind();
  </code></pre>