s = System.Configuration.ConfigurationManager.ConnectionStrings["con"].ConnectionString;
SqlConnection c = new SqlConnection(s);
c.Open();
SqlCommand cmd = new SqlCommand("insert into sample(name) values(@name)", c);
cmd.Parameters.Add("@name", TextBox1.Text);
cmd.ExecuteNonQuery();
c.Close();
SqlConnection c = new SqlConnection(s);
c.Open();
SqlCommand cmd = new SqlCommand("insert into sample(name) values(@name)", c);
cmd.Parameters.Add("@name", TextBox1.Text);
cmd.ExecuteNonQuery();
c.Close();