protected override void CreateChildControls()
 {
     _categorizations = CategorizationFolder.Get(new Id(Request.QueryString["id"]));
     foreach (var type in _categorizations.Types)
     {
         this.Controls.Add(new LiteralControl("<p>"));
         var label = new Label();
         label.Text = type.EntityName;
         this.Controls.Add(label);
         this.Controls.Add(new LiteralControl("<br>"));
         if (type.AllowMultipleSelections || string.Compare(AllowMultipleOnAll,"true", true) == 0)
         {
             var multilist = (MultiListWrapper)LoadControl("~/usercontrols/MultiListWrapper.ascx");
             multilist.Provider = Provider;
             multilist.FieldName = FieldName;
             //multilist.ID = "ctrl_" + n;
             multilist.RootId = type.Id.ToString();
             this.Controls.Add(multilist);
             _editorControls.Add(type.Id, multilist);
         }
         else
         {
             var ddl = new DropDownList();
             ddl.AddDefaultItem();
             foreach (var item in type.Items)
             {
                 ddl.Items.Add(new ListItem(item.DisplayName, item.Id.ToString()));
             }
             //ddl.ID = "ctrl_" + n;
             this.Controls.Add(ddl);
             _editorControls.Add(type.Id, ddl);
         }
         this.Controls.Add(new LiteralControl("</p>"));
     }
 }