protected void btnRemoveSelectedSubject_Click(object sender, EventArgs e) { BaseHandler bh = new BaseHandler(); Subject s = bh.FindSubject(Language, Convert.ToInt32(hdnNodeSubjectId.Value)); if (s.children.Count == 0) { bh.DeleteSubject(Convert.ToInt32(hdnNodeSubjectId.Value)); lblCannotDelete.Visible = false; } else lblCannotDelete.Visible = true; BindTree(); }