public object Render(T obj, EditorField <T> editorFieldInfo, Action preview)
        {
            object value = editorFieldInfo.GetValue(obj);

            _elementType = editorFieldInfo.Type.GenericTypeArguments.Single();

            int[] _selectedIndexes = null;

            if (value is IEnumerable selectedItems)
            {
                _selectedIndexes = selectedItems.Cast <object>().Select(e => Array.IndexOf(_options.Select(f => f.Value).ToArray(), e)).Where(e => e != -1).ToArray();
            }

            _selectBox = new MultiSelectBox(_options, _selectedIndexes);
            _selectBox.SelectionChanged += (sender, args) => preview();

            _selectBox.Enabled = editorFieldInfo.Enabled;

            return(_field = new Field(editorFieldInfo.Label, _selectBox, editorFieldInfo.Description, editorFieldInfo.Helper, editorFieldInfo.Required));
        }
Example #2
0
        protected override void CreateChildControls()
        {
            Panel container = new Panel();

            container.CssClass = this.CssClass;
            Controls.Add(container);

            Panel header = new Panel();

            header.CssClass = "pHead";
            container.Controls.Add(header);

            headerText = new Literal();
            header.Controls.Add(headerText);

            Panel content = new Panel();

            content.CssClass = "pContent";
            container.Controls.Add(content);

            #region TabStrip

            tabstrip = new ComponentArt.Web.UI.TabStrip();

            // Create the DefaultTabLook instance and add it to the ItemLooks collection
            ComponentArt.Web.UI.ItemLook defaultTabLook = new ComponentArt.Web.UI.ItemLook();
            defaultTabLook.LookId             = "DefaultTabLook";
            defaultTabLook.CssClass           = "DefaultTab";
            defaultTabLook.HoverCssClass      = "DefaultTabHover";
            defaultTabLook.LabelPaddingLeft   = Unit.Pixel(10);
            defaultTabLook.LabelPaddingRight  = Unit.Pixel(10);
            defaultTabLook.LabelPaddingTop    = Unit.Pixel(5);
            defaultTabLook.LabelPaddingBottom = Unit.Pixel(4);
            defaultTabLook.LeftIconUrl        = "tab_left_icon.gif";
            defaultTabLook.RightIconUrl       = "tab_right_icon.gif";
            defaultTabLook.HoverLeftIconUrl   = "hover_tab_left_icon.gif";
            defaultTabLook.HoverRightIconUrl  = "hover_tab_right_icon.gif";
            defaultTabLook.LeftIconWidth      = Unit.Pixel(3);
            defaultTabLook.LeftIconHeight     = Unit.Pixel(21);
            defaultTabLook.RightIconWidth     = Unit.Pixel(3);
            defaultTabLook.RightIconHeight    = Unit.Pixel(21);
            tabstrip.ItemLooks.Add(defaultTabLook);

            // Create the SelectedTabLook instance and add it to the ItemLooks collection
            ComponentArt.Web.UI.ItemLook selectedTabLook = new ComponentArt.Web.UI.ItemLook();
            selectedTabLook.LookId             = "SelectedTabLook";
            selectedTabLook.CssClass           = "SelectedTab";
            selectedTabLook.LabelPaddingLeft   = Unit.Pixel(10);
            selectedTabLook.LabelPaddingRight  = Unit.Pixel(10);
            selectedTabLook.LabelPaddingTop    = Unit.Pixel(5);
            selectedTabLook.LabelPaddingBottom = Unit.Pixel(4);
            selectedTabLook.LeftIconUrl        = "selected_tab_left_icon.gif";
            selectedTabLook.RightIconUrl       = "selected_tab_right_icon.gif";
            selectedTabLook.LeftIconWidth      = Unit.Pixel(3);
            selectedTabLook.LeftIconHeight     = Unit.Pixel(21);
            selectedTabLook.RightIconWidth     = Unit.Pixel(3);
            selectedTabLook.RightIconHeight    = Unit.Pixel(21);
            tabstrip.ItemLooks.Add(selectedTabLook);

            ComponentArt.Web.UI.ItemLook scrollItemLook = new ItemLook();
            scrollItemLook.LookId             = "ScrollItem";
            scrollItemLook.CssClass           = "ScrollItem";
            scrollItemLook.HoverCssClass      = "ScrollItemHover";
            scrollItemLook.LabelPaddingLeft   = Unit.Pixel(5);
            scrollItemLook.LabelPaddingRight  = Unit.Pixel(5);
            scrollItemLook.LabelPaddingTop    = Unit.Pixel(0);
            scrollItemLook.LabelPaddingBottom = Unit.Pixel(0);
            tabstrip.ItemLooks.Add(scrollItemLook);

            tabstrip.ID                        = this.ID + "_TabStrip";
            tabstrip.CssClass                  = "TopGroup";
            tabstrip.DefaultItemLookId         = "DefaultTabLook";
            tabstrip.DefaultSelectedItemLookId = "SelectedTabLook";
            tabstrip.DefaultGroupTabSpacing    = 1;
            tabstrip.ImagesBaseUrl             = "tabstrip_images/";
            tabstrip.MultiPageId               = this.ID + "_MultiPage";
            tabstrip.ScrollingEnabled          = true;
            tabstrip.ScrollLeftLookId          = "ScrollItem";
            tabstrip.ScrollRightLookId         = "ScrollItem";
            content.Controls.Add(tabstrip);

            #endregion

            #region MultiPage

            multipage          = new ComponentArt.Web.UI.MultiPage();
            multipage.ID       = this.ID + "_MultiPage";
            multipage.CssClass = "MultiPage";
            content.Controls.Add(multipage);

            #endregion

            #region General

            generalView          = new ComponentArt.Web.UI.PageView();
            generalView.CssClass = "PageContent";
            multipage.PageViews.Add(generalView);

            TabStripTab generalTab = new TabStripTab();
            generalTab.Text       = "General";
            generalTab.PageViewId = generalView.ID;
            tabstrip.Tabs.Add(generalTab);

            tbName = new TextBox();
            tbName.EnableViewState = false;
            tbName.Width           = Unit.Pixel(350);
            registerControl(generalView, "Name", tbName);

            tbDescription = new TextBox();
            tbDescription.EnableViewState = false;
            tbDescription.Rows            = 3;
            tbDescription.TextMode        = TextBoxMode.MultiLine;
            tbDescription.Width           = Unit.Pixel(350);
            registerControl(generalView, "Description", tbDescription);

            PlaceHolder phStartDate = new PlaceHolder();
            generalView.Controls.Add(phStartDate);
            CalendarHelper.RegisterCalendarPair(phStartDate, "calStartDate",
                                                DateTime.Now.Subtract(TimeSpan.FromDays(365 * 20)),
                                                out calStartP, out calStartB, out calStartC, true);
            registerControl(generalView, "First Day", phStartDate);

            PlaceHolder phEndDate = new PlaceHolder();
            generalView.Controls.Add(phEndDate);
            CalendarHelper.RegisterCalendarPair(phEndDate, "calEndDate",
                                                DateTime.Now.Subtract(TimeSpan.FromDays(365 * 20)),
                                                out calEndP, out calEndB, out calEndC, true);
            registerControl(generalView, "Last Day", phEndDate);

            cbIsLocal = new CheckBox();
            cbIsLocal.EnableViewState = false;
            cbIsLocal.Text            = "Yes";
            registerControl(generalView, "Local Seminar", cbIsLocal);

            comboLocation                      = new ComponentArt.Web.UI.ComboBox();
            comboLocation.CssClass             = "comboBox";
            comboLocation.HoverCssClass        = "comboBoxHover";
            comboLocation.FocusedCssClass      = "comboBoxHover";
            comboLocation.TextBoxCssClass      = "comboTextBox";
            comboLocation.DropDownCssClass     = "comboDropDown";
            comboLocation.ItemCssClass         = "comboItem";
            comboLocation.ItemHoverCssClass    = "comboItemHover";
            comboLocation.SelectedItemCssClass = "comboItemHover";
            comboLocation.DropHoverImageUrl    = "combobox_images/drop_hover.gif";
            comboLocation.DropImageUrl         = "combobox_images/drop.gif";
            comboLocation.Width                = Unit.Pixel(300);
            registerControl(generalView, "Location", comboLocation);

            #endregion

            #region Registration

            registrationView          = new ComponentArt.Web.UI.PageView();
            registrationView.CssClass = "PageContent";
            multipage.PageViews.Add(registrationView);

            TabStripTab registrationTab = new TabStripTab();
            registrationTab.Text       = "Registration";
            registrationTab.PageViewId = registrationView.ID;
            tabstrip.Tabs.Add(registrationTab);

            tbBaseRegistrationFee = new TextBox();
            tbBaseRegistrationFee.EnableViewState = false;
            tbBaseRegistrationFee.Width           = Unit.Pixel(50);
            registerControl(registrationView, "Base Fee",
                            tbBaseRegistrationFee);

            PlaceHolder phClassUnitFee = new PlaceHolder();
            registrationView.Controls.Add(phClassUnitFee);
            tbClassUnitFee = new TextBox();
            tbClassUnitFee.EnableViewState = false;
            tbClassUnitFee.Width           = Unit.Pixel(50);
            phClassUnitFee.Controls.Add(tbClassUnitFee);
            phClassUnitFee.Controls.Add(new LiteralControl(" per "));
            ddClassUnitType = new DropDownList();
            phClassUnitFee.Controls.Add(ddClassUnitType);
            registerControl(registrationView, "Class Unit Fee", phClassUnitFee);

            cbRegistrationEnabled = new CheckBox();
            cbRegistrationEnabled.EnableViewState = false;
            cbRegistrationEnabled.Text            = "Yes";
            registerControl(registrationView, "Enable Registration",
                            cbRegistrationEnabled);

            PlaceHolder phRegStart = new PlaceHolder();
            registrationView.Controls.Add(phRegStart);
            CalendarHelper.RegisterCalendarPair(phRegStart,
                                                "calRegStart", DateTime.Now,
                                                out calRegStartP, out calRegStartB, out calRegStartC, true);
            registerControl(registrationView, "Registration Starts", phRegStart);

            tbFullEarlyRegistrationFee = new TextBox();
            tbFullEarlyRegistrationFee.EnableViewState = false;
            tbFullEarlyRegistrationFee.Width           = Unit.Pixel(50);
            registerControl(registrationView, "Full Early Reg. Fee",
                            tbFullEarlyRegistrationFee);

            PlaceHolder phEarlyEnd = new PlaceHolder();
            registrationView.Controls.Add(phEarlyEnd);
            CalendarHelper.RegisterCalendarPair(phEarlyEnd,
                                                "calEarlyEnd", DateTime.Now,
                                                out calEarlyEndP, out calEarlyEndB, out calEarlyEndC, true);
            registerControl(registrationView, "Early Registration Ends", phEarlyEnd);

            tbFullRegistrationFee = new TextBox();
            tbFullRegistrationFee.EnableViewState = false;
            tbFullRegistrationFee.Width           = Unit.Pixel(50);
            registerControl(registrationView, "Full Reg. Fee",
                            tbFullRegistrationFee);

            PlaceHolder phLateStart = new PlaceHolder();
            registrationView.Controls.Add(phLateStart);
            CalendarHelper.RegisterCalendarPair(phLateStart,
                                                "calLateStart", DateTime.Now,
                                                out calLateStartP, out calLateStartB, out calLateStartC, true);
            registerControl(registrationView, "Late Reg. Starts", phLateStart);

            tbFullLateRegistrationFee = new TextBox();
            tbFullLateRegistrationFee.EnableViewState = false;
            tbFullLateRegistrationFee.Width           = Unit.Pixel(50);
            registerControl(registrationView, "Full Late Reg. Fee",
                            tbFullLateRegistrationFee);

            PlaceHolder phRegEnd = new PlaceHolder();
            registrationView.Controls.Add(phRegEnd);
            CalendarHelper.RegisterCalendarPair(phRegEnd,
                                                "calRegEnd", DateTime.Now,
                                                out calRegEndP, out calRegEndB, out calRegEndC, true);
            registerControl(registrationView, "Registration Ends", phRegEnd);

            comboRappahanockItem                      = new ComponentArt.Web.UI.ComboBox();
            comboRappahanockItem.CssClass             = "comboBox";
            comboRappahanockItem.HoverCssClass        = "comboBoxHover";
            comboRappahanockItem.FocusedCssClass      = "comboBoxHover";
            comboRappahanockItem.TextBoxCssClass      = "comboTextBox";
            comboRappahanockItem.DropDownCssClass     = "comboDropDown";
            comboRappahanockItem.ItemCssClass         = "comboItem";
            comboRappahanockItem.ItemHoverCssClass    = "comboItemHover";
            comboRappahanockItem.SelectedItemCssClass = "comboItemHover";
            comboRappahanockItem.DropHoverImageUrl    = "combobox_images/drop_hover.gif";
            comboRappahanockItem.DropImageUrl         = "combobox_images/drop.gif";
            comboRappahanockItem.Width                = Unit.Pixel(300);
            registerControl(registrationView, "Rappahanock Item", comboRappahanockItem);

            #endregion

            #region Options

            optionsView          = new ComponentArt.Web.UI.PageView();
            optionsView.CssClass = "PageContent";
            multipage.PageViews.Add(optionsView);

            TabStripTab optionsTab = new TabStripTab();
            optionsTab.Text       = "Options";
            optionsTab.PageViewId = optionsView.ID;
            tabstrip.Tabs.Add(optionsTab);

            msOptions      = new MultiSelectBox();
            msOptions.Mode = MultiSelectBoxMode.CheckBoxList;
            registerControl(optionsView, "Options", msOptions);

            #endregion

            #region Details

            detailsView          = new ComponentArt.Web.UI.PageView();
            detailsView.CssClass = "PageContent";
            multipage.PageViews.Add(detailsView);

            TabStripTab detailsTab = new TabStripTab();
            detailsTab.Text       = "Details";
            detailsTab.PageViewId = detailsView.ID;
            tabstrip.Tabs.Add(detailsTab);

            tbDetails                 = new TextBox();
            tbDetails.TextMode        = TextBoxMode.MultiLine;
            tbDetails.Rows            = 20;
            tbDetails.Width           = Unit.Percentage(100);
            tbDetails.EnableViewState = false;
            registerControl(detailsView, "Details", tbDetails);

            tbDetailsOverrideUrl = new TextBox();
            tbDetailsOverrideUrl.EnableViewState = false;
            tbDetailsOverrideUrl.Width           = Unit.Pixel(350);
            registerControl(detailsView, "Details Override URL", tbDetailsOverrideUrl);

            tbPdfUrl = new TextBox();
            tbPdfUrl.EnableViewState = false;
            tbPdfUrl.Width           = Unit.Pixel(350);
            registerControl(detailsView, "PDF Link URL", tbPdfUrl);

            #endregion

            #region Buttons

            Panel buttons = new Panel();
            buttons.CssClass = "pButtons";
            content.Controls.Add(buttons);

            btOk                 = new Button();
            btOk.Text            = "OK";
            btOk.Width           = Unit.Pixel(72);
            btOk.EnableViewState = false;
            btOk.Click          += new EventHandler(ok_Click);
            buttons.Controls.Add(btOk);

            btCancel                 = new Button();
            btCancel.Text            = "Cancel";
            btCancel.Width           = Unit.Pixel(72);
            btCancel.EnableViewState = false;
            btCancel.Click          += new EventHandler(cancel_Click);
            buttons.Controls.Add(btCancel);

            btDelete                 = new Button();
            btDelete.Text            = "Delete";
            btDelete.Width           = Unit.Pixel(72);
            btDelete.EnableViewState = false;
            btDelete.Click          += new EventHandler(delete_Click);
            buttons.Controls.Add(btDelete);

            #endregion

            bind();

            ChildControlsCreated = true;
        }
Example #3
0
        protected override void CreateChildControls()
        {
            Panel container = new Panel();

            container.CssClass = this.CssClass;
            Controls.Add(container);

            Panel header = new Panel();

            header.CssClass = "pHead";
            container.Controls.Add(header);

            headerText = new Literal();
            header.Controls.Add(headerText);

            Panel content = new Panel();

            content.CssClass = "pContent";
            container.Controls.Add(content);

            #region TabStrip

            tabstrip = new ComponentArt.Web.UI.TabStrip();

            // Create the DefaultTabLook instance and add it to the ItemLooks collection
            ComponentArt.Web.UI.ItemLook defaultTabLook = new ComponentArt.Web.UI.ItemLook();
            defaultTabLook.LookId             = "DefaultTabLook";
            defaultTabLook.CssClass           = "DefaultTab";
            defaultTabLook.HoverCssClass      = "DefaultTabHover";
            defaultTabLook.LabelPaddingLeft   = Unit.Parse("10");
            defaultTabLook.LabelPaddingRight  = Unit.Parse("10");
            defaultTabLook.LabelPaddingTop    = Unit.Parse("5");
            defaultTabLook.LabelPaddingBottom = Unit.Parse("4");
            defaultTabLook.LeftIconUrl        = "tab_left_icon.gif";
            defaultTabLook.RightIconUrl       = "tab_right_icon.gif";
            defaultTabLook.HoverLeftIconUrl   = "hover_tab_left_icon.gif";
            defaultTabLook.HoverRightIconUrl  = "hover_tab_right_icon.gif";
            defaultTabLook.LeftIconWidth      = Unit.Parse("3");
            defaultTabLook.LeftIconHeight     = Unit.Parse("21");
            defaultTabLook.RightIconWidth     = Unit.Parse("3");
            defaultTabLook.RightIconHeight    = Unit.Parse("21");
            tabstrip.ItemLooks.Add(defaultTabLook);

            // Create the SelectedTabLook instance and add it to the ItemLooks collection
            ComponentArt.Web.UI.ItemLook selectedTabLook = new ComponentArt.Web.UI.ItemLook();
            selectedTabLook.LookId             = "SelectedTabLook";
            selectedTabLook.CssClass           = "SelectedTab";
            selectedTabLook.LabelPaddingLeft   = Unit.Parse("10");
            selectedTabLook.LabelPaddingRight  = Unit.Parse("10");
            selectedTabLook.LabelPaddingTop    = Unit.Parse("5");
            selectedTabLook.LabelPaddingBottom = Unit.Parse("4");
            selectedTabLook.LeftIconUrl        = "selected_tab_left_icon.gif";
            selectedTabLook.RightIconUrl       = "selected_tab_right_icon.gif";
            selectedTabLook.LeftIconWidth      = Unit.Parse("3");
            selectedTabLook.LeftIconHeight     = Unit.Parse("21");
            selectedTabLook.RightIconWidth     = Unit.Parse("3");
            selectedTabLook.RightIconHeight    = Unit.Parse("21");
            tabstrip.ItemLooks.Add(selectedTabLook);

            tabstrip.ID                        = this.ID + "_TabStrip";
            tabstrip.CssClass                  = "TopGroup";
            tabstrip.DefaultItemLookId         = "DefaultTabLook";
            tabstrip.DefaultSelectedItemLookId = "SelectedTabLook";
            tabstrip.DefaultGroupTabSpacing    = 1;
            tabstrip.ImagesBaseUrl             = "tabstrip_images/";
            tabstrip.MultiPageId               = this.ID + "_MultiPage";
            content.Controls.Add(tabstrip);

            #endregion

            multipage          = new ComponentArt.Web.UI.MultiPage();
            multipage.ID       = this.ID + "_MultiPage";
            multipage.CssClass = "MultiPage";
            content.Controls.Add(multipage);

            #region General Folder

            generalView = new ComponentArt.Web.UI.PageView();

            generalView.CssClass = "PageContent";
            multipage.PageViews.Add(generalView);

            TabStripTab generalTab = new TabStripTab();
            generalTab.Text       = "General";
            generalTab.PageViewId = generalView.ID;
            tabstrip.Tabs.Add(generalTab);

            generalView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            generalView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Title</span>"));
            generalView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbTitle = new TextBox();
            tbTitle.EnableViewState = false;
            tbTitle.Rows            = 2;
            tbTitle.MaxLength       = 255;
            tbTitle.TextMode        = TextBoxMode.MultiLine;
            tbTitle.Width           = Unit.Pixel(350);
            tbTitle.ToolTip         = "Title of content.";
            generalView.Controls.Add(tbTitle);
            generalView.Controls.Add(new LiteralControl("</span></div>"));

            generalView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            generalView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Description</span>"));
            generalView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbDescription = new TextBox();
            tbDescription.EnableViewState = false;
            tbDescription.Rows            = 5;
            tbDescription.MaxLength       = 255;
            tbDescription.TextMode        = TextBoxMode.MultiLine;
            tbDescription.Width           = Unit.Pixel(350);
            tbDescription.ToolTip         = "Description for search engines, directories and summaries.";
            generalView.Controls.Add(tbDescription);
            generalView.Controls.Add(new LiteralControl("</span></div>"));

            generalView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            generalView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Override URL</span>"));
            generalView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbOverrideUrl = new TextBox();
            tbOverrideUrl.EnableViewState = false;
            tbOverrideUrl.Width           = Unit.Pixel(350);
            tbOverrideUrl.ToolTip         = "Overrides the body with a URL.";
            generalView.Controls.Add(tbOverrideUrl);
            generalView.Controls.Add(new LiteralControl("</span></div>"));

            generalView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            generalView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Icon</span>"));
            generalView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbIcon = new TextBox();
            tbIcon.EnableViewState = false;
            tbIcon.Width           = Unit.Pixel(300);
            generalView.Controls.Add(tbIcon);
            generalView.Controls.Add(new LiteralControl("</span></div>"));

            #endregion

            #region Body Folder

            bodyView          = new ComponentArt.Web.UI.PageView();
            bodyView.CssClass = "PageContent";
            multipage.PageViews.Add(bodyView);

            TabStripTab bodyTab = new TabStripTab();
            bodyTab.Text       = "Body";
            bodyTab.PageViewId = bodyView.ID;
            tabstrip.Tabs.Add(bodyTab);

            //userEditor = Page.LoadControl(_editorUserControlUrl);
            ////bodyView.Controls.Add(userEditor);
            //caEditor = ((IEditor)userEditor).Editor;
            //((IEditor)userEditor).SkinPath = userEditor.TemplateSourceDirectory;
            //((IEditor)userEditor).Editor.DesignCssClass = DesignModeCss;

            bodyView.Controls.Add(new LiteralControl("<div>WSYWIG editing is available through a new interface, " +
                                                     "please use the link provided to access the HTML editor.</div>"));

            tbBody                 = new TextBox();
            tbBody.Rows            = 40;
            tbBody.TextMode        = TextBoxMode.MultiLine;
            tbBody.Width           = Unit.Pixel(450);
            tbBody.EnableViewState = false;
            tbBody.Style.Add("font-family", "courier");
            bodyView.Controls.Add(tbBody);

            #endregion

            #region Index Folder

            indexView = new ComponentArt.Web.UI.PageView();

            indexView.CssClass = "PageContent";
            multipage.PageViews.Add(indexView);

            TabStripTab indexTab = new TabStripTab();
            indexTab.Text       = "Indexing";
            indexTab.PageViewId = generalView.ID;
            tabstrip.Tabs.Add(indexTab);

            indexView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            indexView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Keywords</span>"));
            indexView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbKeywords = new TextBox();
            tbKeywords.EnableViewState = false;
            tbKeywords.Width           = Unit.Pixel(350);
            tbKeywords.ToolTip         = "Metadata keywords for search engines.";
            indexView.Controls.Add(tbKeywords);
            indexView.Controls.Add(new LiteralControl("</span></div>"));

            indexView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            indexView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">References</span>"));
            indexView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbReferences    = new TextBox();
            tbReferences.ID = this.ID + "_ref";
            tbReferences.EnableViewState = false;
            tbReferences.Rows            = 5;
            tbReferences.MaxLength       = 1500;
            tbReferences.TextMode        = TextBoxMode.MultiLine;
            tbReferences.Width           = Unit.Pixel(350);
            tbReferences.ToolTip         = "Referenced clips. Separate references with a carriage return.";
            indexView.Controls.Add(tbReferences);
            indexView.Controls.Add(new LiteralControl("</span></div>"));

            indexView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            indexView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">&nbsp;</span>"));
            indexView.Controls.Add(new LiteralControl("<span class=\"inputfield\"><div style=\"float:left\">"));
            referenceComboBox                      = new ComponentArt.Web.UI.ComboBox();
            referenceComboBox.ID                   = this.ID + "_rcb";
            referenceComboBox.CssClass             = "comboBox";
            referenceComboBox.HoverCssClass        = "comboBoxHover";
            referenceComboBox.FocusedCssClass      = "comboBoxHover";
            referenceComboBox.TextBoxCssClass      = "comboTextBox";
            referenceComboBox.DropDownCssClass     = "comboDropDown";
            referenceComboBox.ItemCssClass         = "comboItem";
            referenceComboBox.ItemHoverCssClass    = "comboItemHover";
            referenceComboBox.SelectedItemCssClass = "comboItemHover";
            referenceComboBox.DropHoverImageUrl    = "combobox_images/drop_hover.gif";
            referenceComboBox.DropImageUrl         = "combobox_images/drop.gif";
            referenceComboBox.Width                = Unit.Pixel(250);
            referenceComboBox.EnableViewState      = false;
            indexView.Controls.Add(referenceComboBox);
            indexView.Controls.Add(new LiteralControl("</div><div><input type=\"button\" value=\"Add\" " +
                                                      "align=\"right\" onClick=\"" +
                                                      tbReferences.ClientID + ".value += (" + tbReferences.ClientID + ".value != '' ? '\\r\\n' : '') + " +
                                                      referenceComboBox.ClientObjectId + ".getSelectedItem().Text;\"></div>"));
            indexView.Controls.Add(new LiteralControl("</span></div>"));

            indexView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            indexView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Rating</span>"));
            indexView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            ratingComboBox                      = new ComponentArt.Web.UI.ComboBox();
            ratingComboBox.ID                   = this.ID + "_rating";
            ratingComboBox.CssClass             = "comboBox";
            ratingComboBox.HoverCssClass        = "comboBoxHover";
            ratingComboBox.FocusedCssClass      = "comboBoxHover";
            ratingComboBox.TextBoxCssClass      = "comboTextBox";
            ratingComboBox.DropDownCssClass     = "comboDropDown";
            ratingComboBox.ItemCssClass         = "comboItem";
            ratingComboBox.ItemHoverCssClass    = "comboItemHover";
            ratingComboBox.SelectedItemCssClass = "comboItemHover";
            ratingComboBox.DropHoverImageUrl    = "combobox_images/drop_hover.gif";
            ratingComboBox.DropImageUrl         = "combobox_images/drop.gif";
            ratingComboBox.Width                = Unit.Pixel(250);
            indexView.Controls.Add(ratingComboBox);
            indexView.Controls.Add(new LiteralControl("</span></div>"));

            indexView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            indexView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Status</span>"));
            indexView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            msStatus      = new MultiSelectBox();
            msStatus.Mode = MultiSelectBoxMode.DropDownList;
            indexView.Controls.Add(msStatus);
            indexView.Controls.Add(new LiteralControl("</span></div>"));

            indexView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            indexView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Priority</span>"));
            indexView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbPriority = new TextBox();
            tbPriority.EnableViewState = false;
            indexView.Controls.Add(tbPriority);
            indexView.Controls.Add(new LiteralControl("</span></div>"));

            indexView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            indexView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Sort Order</span>"));
            indexView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbSortOrder = new TextBox();
            tbSortOrder.EnableViewState = false;
            indexView.Controls.Add(tbSortOrder);
            indexView.Controls.Add(new LiteralControl("</span></div>"));

            #endregion

            #region Publishing Folder

            publishingView          = new ComponentArt.Web.UI.PageView();
            publishingView.CssClass = "PageContent";
            multipage.PageViews.Add(publishingView);

            TabStripTab publishingTab = new TabStripTab();
            publishingTab.Text       = "Publishing";
            publishingTab.PageViewId = publishingView.ID;
            tabstrip.Tabs.Add(publishingTab);

            publishingView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            publishingView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Clip ID</span>"));
            publishingView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            publishingView.Controls.Add(new LiteralControl(this.dbContentClipID.ToString()));
            publishingView.Controls.Add(new LiteralControl("</span></div>"));

            publishingView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            publishingView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Create Date</span>"));
            publishingView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            ltCreateDate = new Literal();
            ltCreateDate.EnableViewState = false;
            publishingView.Controls.Add(ltCreateDate);
            publishingView.Controls.Add(new LiteralControl("</span></div>"));

            publishingView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            publishingView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Modify Date</span>"));
            publishingView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            ltModifyDate = new Literal();
            ltModifyDate.EnableViewState = false;
            publishingView.Controls.Add(ltModifyDate);
            publishingView.Controls.Add(new LiteralControl("</span></div>"));

            publishingView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            publishingView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Parent Catalog</span>"));
            publishingView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            msParentCatalog                 = new MultiSelectBox();
            msParentCatalog.Mode            = MultiSelectBoxMode.DropDownList;
            msParentCatalog.EnableViewState = false;
            publishingView.Controls.Add(msParentCatalog);
            publishingView.Controls.Add(new LiteralControl("</span></div>"));

            publishingView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            publishingView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Publish Date</span>"));
            publishingView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            PlaceHolder phPublishDate = new PlaceHolder();
            publishingView.Controls.Add(phPublishDate);
            CalendarHelper.RegisterCalendarPair(phPublishDate, "calPublishDate",
                                                out calPublishDateP, out calPublishDateB, out calPublishDateC, true);
            publishingView.Controls.Add(new LiteralControl("</span></div>"));

            publishingView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            publishingView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Expiration Date</span>"));
            publishingView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            PlaceHolder phExpirationDate = new PlaceHolder();
            publishingView.Controls.Add(phExpirationDate);
            CalendarHelper.RegisterCalendarPair(phExpirationDate, "calExpirationDate",
                                                out calExpirationDateP, out calExpirationDateB, out calExpirationDateC, true);
            publishingView.Controls.Add(new LiteralControl("</span></div>"));

            publishingView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            publishingView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Archive Date</span>"));
            publishingView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            PlaceHolder phArchiveDate = new PlaceHolder();
            publishingView.Controls.Add(phArchiveDate);
            CalendarHelper.RegisterCalendarPair(phArchiveDate, "calArchiveDate",
                                                out calArchiveDateP, out calArchiveDateB, out calArchiveDateC, true);
            publishingView.Controls.Add(new LiteralControl("</span></div>"));

            publishingView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            publishingView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Comments Enabled</span>"));
            publishingView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            cbCommentsEnabled = new CheckBox();
            cbCommentsEnabled.EnableViewState = false;
            publishingView.Controls.Add(cbCommentsEnabled);
            publishingView.Controls.Add(new LiteralControl("</span></div>"));

            publishingView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            publishingView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Comments Notification</span>"));
            publishingView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            cbNotifyOnComments = new CheckBox();
            cbNotifyOnComments.EnableViewState = false;
            publishingView.Controls.Add(cbNotifyOnComments);
            publishingView.Controls.Add(new LiteralControl("</span></div>"));

            #endregion

            #region Contributors Folder

            contributorView          = new ComponentArt.Web.UI.PageView();
            contributorView.CssClass = "PageContent";
            multipage.PageViews.Add(contributorView);

            TabStripTab contributorTab = new TabStripTab();
            contributorTab.Text       = "Contributors";
            contributorTab.PageViewId = contributorView.ID;
            tabstrip.Tabs.Add(contributorTab);

            contributorView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            contributorView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Authors</span>"));
            contributorView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbAuthors = new TextBox();
            contributorView.Controls.Add(tbAuthors);
            contributorView.Controls.Add(new LiteralControl("</span></div>"));

            contributorView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            contributorView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Editors</span>"));
            contributorView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbEditors = new TextBox();
            contributorView.Controls.Add(tbEditors);
            contributorView.Controls.Add(new LiteralControl("</span></div>"));

            #endregion

            #region Menu Folder

            menuView          = new ComponentArt.Web.UI.PageView();
            menuView.CssClass = "PageContent";
            multipage.PageViews.Add(menuView);

            TabStripTab menuTab = new TabStripTab();
            menuTab.Text       = "Menu";
            menuTab.PageViewId = menuView.ID;
            tabstrip.Tabs.Add(menuTab);

            menuView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            menuView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Label</span>"));
            menuView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbMenuLabel = new TextBox();
            tbMenuLabel.EnableViewState = false;
            tbMenuLabel.Width           = Unit.Pixel(250);
            tbMenuLabel.ToolTip         = "Label displayed on menu.";
            menuView.Controls.Add(tbMenuLabel);
            menuView.Controls.Add(new LiteralControl("</span></div>"));

            menuView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            menuView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Tooltip</span>"));
            menuView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbMenuTooltip = new TextBox();
            tbMenuTooltip.EnableViewState = false;
            tbMenuTooltip.Width           = Unit.Pixel(250);
            tbMenuTooltip.ToolTip         = "Tooltip displayed when hovering over item.";
            menuView.Controls.Add(tbMenuTooltip);
            menuView.Controls.Add(new LiteralControl("</span></div>"));

            menuView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            menuView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Enabled</span>"));
            menuView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            cbMenuEnabled = new CheckBox();
            cbMenuEnabled.EnableViewState = false;
            menuView.Controls.Add(cbMenuEnabled);
            menuView.Controls.Add(new LiteralControl("</span></div>"));

            menuView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            menuView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Order</span>"));
            menuView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbMenuOrder = new TextBox();
            tbMenuOrder.EnableViewState = false;
            menuView.Controls.Add(tbMenuOrder);
            menuView.Controls.Add(new LiteralControl("</span></div>"));

            menuView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            menuView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Left Icon</span>"));
            menuView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbMenuLeftIcon = new TextBox();
            tbMenuLeftIcon.EnableViewState = false;
            menuView.Controls.Add(tbMenuLeftIcon);
            menuView.Controls.Add(new LiteralControl("</span></div>"));

            menuView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            menuView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Left Icon Over</span>"));
            menuView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbMenuLeftIconOver = new TextBox();
            tbMenuLeftIconOver.EnableViewState = false;
            menuView.Controls.Add(tbMenuLeftIconOver);
            menuView.Controls.Add(new LiteralControl("</span></div>"));

            menuView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            menuView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Right Icon</span>"));
            menuView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbMenuRightIcon = new TextBox();
            tbMenuRightIcon.EnableViewState = false;
            menuView.Controls.Add(tbMenuRightIcon);
            menuView.Controls.Add(new LiteralControl("</span></div>"));

            menuView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            menuView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Right Icon Over</span>"));
            menuView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbMenuRightIconOver = new TextBox();
            tbMenuRightIconOver.EnableViewState = false;
            menuView.Controls.Add(tbMenuRightIconOver);
            menuView.Controls.Add(new LiteralControl("</span></div>"));

            menuView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            menuView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Menu Break</span>"));
            menuView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            cbMenuBreak = new CheckBox();
            cbMenuBreak.EnableViewState = false;
            menuView.Controls.Add(cbMenuBreak);
            menuView.Controls.Add(new LiteralControl("</span></div>"));

            #endregion

            Panel buttons = new Panel();
            buttons.CssClass = "pButtons";
            content.Controls.Add(buttons);

            btOk                 = new Button();
            btOk.Text            = "OK";
            btOk.Width           = Unit.Pixel(72);
            btOk.EnableViewState = false;
            btOk.Click          += new EventHandler(ok_Click);
            buttons.Controls.Add(btOk);

            btCancel                 = new Button();
            btCancel.Text            = "Cancel";
            btCancel.Width           = Unit.Pixel(72);
            btCancel.EnableViewState = false;
            btCancel.Click          += new EventHandler(cancel_Click);
            buttons.Controls.Add(btCancel);

            btDelete                 = new Button();
            btDelete.Text            = "Delete";
            btDelete.Width           = Unit.Pixel(72);
            btDelete.EnableViewState = false;
            btDelete.Click          += new EventHandler(delete_Click);
            buttons.Controls.Add(btDelete);

            bind();

            ChildControlsCreated = true;
        }