title: How to bind data to label in asp.net
body: <p>I have created a form in asp.net,where i have some textbox, in which I have taken some input which is stored in the database.  I have created another page where I have taken the same number of label as the textbox. </p>
  
  <p>I want to show the data in the labels that I last entered.</p>
  
  <p>How can i do that?</p>
  
  <p>Code:</p>
  
  <pre><code>string cs = ConfigurationManager.ConnectionStrings["TrishanConnection"].ConnectionString;
  SqlConnection con = new SqlConnection(cs);
  SqlDataAdapter da = new SqlDataAdapter("SELECT TOP 1 coil_id FROM CoilDetails ORDER BY coil_id DESC", con);
  con.Open();
  DataSet ds = new DataSet();
  da.Fill(ds);
  
  LabeCoilid.Text = ds.ToString();
  LabeCoilid.DataBind();
  con.Close();
  </code></pre>