title: retrieving textbox data to sql from asp.net
body: <p>i have a code to move data from asp.net (c# code) to sql. In the following code i have inserted  values directly (i.e) xxx and yyy.This works too. Now i want to insert the values which was entered in text boxes. What will be the code to do so?. Help  me friends.</p>
  
  <pre><code>protected void Button2_Click(object sender, EventArgs e)
  { 
      string  comm="insert into login values('xxx','yyy')";
      con = new SqlConnection();
      con.ConnectionString = ConfigurationManager.ConnectionStrings["con"].ConnectionString.ToString();
      cmd = new SqlCommand(comm, con);
      cmd.Connection.Open();
      con.Open();
      int i = cmd.ExecuteNonQuery();
      cmd.Connection.Close();  
  }
  </code></pre>