SqlConnection conn = new SqlConnection("Data Source=.\\SQLEXPRESS;Initial Catalog=testdb;Integrated Security=True");
conn.Open();
string Insquery = "INSERT INTO userinfo values('"+TextBox1.text+"')"
SqlCommand cmd = new SqlCommand(Insquery,conn);
cmd.ExecuteNonQuery();
Response.Write("Inserted");
conn.Close();
I hope the above information will be helpful. If you have more concerns, please let me know.