title: How to bind data from a database to a listbox using a disconnected database
body: <p>I have a listbox and would like to fill it with data from a database, the two must be linked so if i select a value from the listbox i can work with the entry in the database.</p>
  
  <p>I'm using a disconnected database witch connects though a connection string:</p>
  
  <pre><code>conn = new SqlConnection(Properties.Settings.Default.DBConnectionString)
  </code></pre>
  
  <p>I have read up on dataset's and think i need to create one and use it as my listbox data source, Then to have the data displayed looking neat i need to set the display name.</p>
  
  <p>Could someone show me how to create a dataset that's connected to my table in my database and then show me how to bind it.</p>
  
  <p>Database is called <strong>TagCloudDB</strong> and table is called <strong>Tag</strong> and just <strong>listbox1</strong>.</p>
  
  <p>This is the code i have so far, but it just fills the listbox with System.Data.DataRowView.</p>
  
  <pre><code>using (var conn = new SqlConnection(Properties.Settings.Default.DBConnectionString))
              {
                  conn.Open();
  
                  SqlDataAdapter daTags
                  = new SqlDataAdapter("Select * From Tag", conn);
  
                  DataSet dsTags = new DataSet("TagCloud");
  
                  daTags.FillSchema(dsTags, SchemaType.Source, "Tag");
                  daTags.Fill(dsTags, "Tag");
  
                  daTags.MissingSchemaAction = MissingSchemaAction.AddWithKey;
                  daTags.Fill(dsTags, "Tag");
  
                  DataTable tblTag;
                  tblTag = dsTags.Tables["Tag"];
  
                  dplTags.DataSource = dsTags;
                  dplTags.DataMember = "Tag";
                  dplTags.DataBind();
              }
  </code></pre>
  
  <p>I did some thing similar in collage with VB and they have a <strong>ValueMember</strong> and <strong>Displaymember</strong>, Whats the equivalent in C#</p>