protected void btnSave_Click(Object Sender, EventArgs e) { oClass.DeleteEnvironmentAP(intClass); foreach (TreeNode oNode in oTree.Nodes) { if (oNode.Checked == true) { oClass.AddEnvironmentAP(intClass, Int32.Parse(oNode.Value)); } } Reload(); }