private void AddAttributeGroups() { AttributeGroupCollection groups = new AttributeGroupCollection(CurrentOrganization.OrganizationID); foreach (AttributeGroup group in groups) { ListItem item = new ListItem(group.GroupName); item.Attributes["optgroup"] = "1"; drpAttribute.Items.Add(item); AddAttributes(group); } }