private static void CreateDropDownList(PersonAttribute attribute, string cssClass, Control parentContainer, bool setValue, bool enabled) { DynamicDropDownList ddl = new DynamicDropDownList(); parentContainer.Controls.Add(ddl); ddl.ID = GetControlID(attribute); ddl.CssClass = cssClass; ddl.Enabled = enabled; LookupCollection lookups = new LookupCollection(int.Parse(attribute.TypeQualifier)); lookups.LoadDropDownList(ddl); ddl.Items.Insert(0, DynamicDropDownList.GetDefaultSelectItem()); if (setValue) { ddl.ClearSelection(); ddl.SelectedValue = attribute.IntValue.ToString(); } }