Hi,
Try this:
protected void SubmitButton(object sender, EventArgs e)
{
SqlConnection Conn = new SqlConnection();
Conn.ConnectionString = ConfigurationManager.ConnectionStrings["PersonTest"].ConnectionString;
SqlCommand Cmd = new SqlCommand();
Cmd.CommandText = "INSERT INTO Perosn (Name, Family) Values (@Name,@Family)";
Cmd.Parameters.AddWithValue("@Name", txtName.Text);
Cmd.Parameters.AddWithValue("@Family", txtFamily.Text);
Cmd.Connection = Conn;
Conn.Open();
Cmd.ExecuteNonQuery();
Conn.Close();
}
--Amit