You probably do want to use web.config - in fact it is almost guaranteed you do if you are producign a web based solution, as the path to your SQL server instance is likely to be different in production and developement, so you will need two different conection strings, and web.config is where they are normally kept. Up to you though...
using (SqlConnection con = new SqlConnection(strConnect))
{
con.Open();
using (SqlCommand com = new SqlCommand("INSERT INTO myTable (myColumn1, myColumn2) VALUES (@C1, @C2)", con))
{
com.Parameters.AddWithValue("@C1", myValueForColumn1);
com.Parameters.AddWithValue("@C2", myValueForColumn2);
com.ExecuteNonQuery();
}
}