Esempio n. 1
0
        protected override void CreateChildControls()
        {
            if (MenuCacheControl.MenuExists(this._catalogID, this._linkFormat))
            {
                _cached = true;
            }
            else
            {
                _menu = new ComponentArt.Web.UI.Menu();

                _menu.ID                      = this.ID + "_menu";
                _menu.CssClass                = "TopGroup";
                _menu.EnableViewState         = false;
                _menu.Orientation             = GroupOrientation.Vertical;
                _menu.DefaultGroupCssClass    = "MenuGroup";
                _menu.DefaultGroupItemSpacing = 1;
                _menu.ImagesBaseUrl           = "~/";
                _menu.EnableViewState         = false;
                _menu.Width                   = _width;
//				_menu.ClientScriptLocation = "~/componentart_webui_client";

                // Create default Item Look
                ItemLook itmLook = new ItemLook();
                itmLook.LookId             = "MenuItem";
                itmLook.CssClass           = "MenuItem";
                itmLook.HoverCssClass      = "MenuItemHover";
                itmLook.ActiveCssClass     = "MenuItemDown";
                itmLook.ExpandedCssClass   = "MenuItemDown";
                itmLook.LabelPaddingLeft   = Unit.Pixel(5);
                itmLook.LabelPaddingRight  = Unit.Pixel(15);
                itmLook.LabelPaddingTop    = Unit.Pixel(2);
                itmLook.LabelPaddingBottom = Unit.Pixel(2);

                _menu.ItemLooks.Add(itmLook);

                _menu.DefaultItemLookId = "MenuItem";

                Controls.Add(_menu);
            }

            ChildControlsCreated = true;
        }
Esempio n. 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;
        }
Esempio n. 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.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 View

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

            TabStripTab generalTab = new TabStripTab();
            generalTab.Text       = Localization.PeopleStrings.GeneralTab;
            generalTab.PageViewId = generalView.ID;
            tabstrip.Tabs.Add(generalTab);

            tbUserName                   = new TextBox();
            tbUserName.Width             = Unit.Pixel(175);
            tbUserName.EnableViewState   = false;
            cbIsDisabled                 = new CheckBox();
            cbIsDisabled.Width           = Unit.Pixel(175);
            cbIsDisabled.EnableViewState = false;
            cbIsDisabled.Text            = Localization.Strings.Disabled;
            registerControl(generalView,
                            Localization.SecurityStrings.Username, tbUserName, cbIsDisabled);

            tbLoginPassword                 = new TextBox();
            tbLoginPassword.Width           = Unit.Pixel(175);
            tbLoginPassword.TextMode        = TextBoxMode.Password;
            tbLoginPassword.EnableViewState = false;
            registerControl(generalView,
                            Localization.SecurityStrings.Password, tbLoginPassword);

            registerControl(generalView,
                            string.Empty, new LiteralControl("<em>" +
                                                             Localization.SecurityStrings.PasswordTextBoxNote + "</em>"));

            tbRoles    = new TextBox();
            tbRoles.ID = this.ID + "_ref";
            tbRoles.EnableViewState = false;
            tbRoles.Rows            = 10;
            tbRoles.MaxLength       = 1500;
            tbRoles.TextMode        = TextBoxMode.MultiLine;
            tbRoles.Width           = Unit.Pixel(350);
            tbRoles.ToolTip         = Localization.SecurityStrings.RolesTextBoxNote;
            registerControl(generalView,
                            Localization.SecurityStrings.Roles, tbRoles);

            Panel rolesPanel = new Panel();
            rolesPanel.Controls.Add(new LiteralControl("<div style=\"float:left\">"));
            comboRoles                      = new ComponentArt.Web.UI.ComboBox();
            comboRoles.ID                   = this.ID + "_rcb";
            comboRoles.CssClass             = "comboBox";
            comboRoles.HoverCssClass        = "comboBoxHover";
            comboRoles.FocusedCssClass      = "comboBoxHover";
            comboRoles.TextBoxCssClass      = "comboTextBox";
            comboRoles.DropDownCssClass     = "comboDropDown";
            comboRoles.ItemCssClass         = "comboItem";
            comboRoles.ItemHoverCssClass    = "comboItemHover";
            comboRoles.SelectedItemCssClass = "comboItemHover";
            comboRoles.DropHoverImageUrl    = "combobox_images/drop_hover.gif";
            comboRoles.DropImageUrl         = "combobox_images/drop.gif";
            comboRoles.Width                = Unit.Pixel(250);
            comboRoles.EnableViewState      = false;
            rolesPanel.Controls.Add(comboRoles);
            rolesPanel.Controls.Add(new LiteralControl("</div><div><input type=\"button\" value=\"" +
                                                       Localization.Strings.Add + "\" " +
                                                       "align=\"right\" onClick=\"" +
                                                       tbRoles.ClientID + ".value += (" + tbRoles.ClientID + ".value != '' ? '\\r\\n' : '') + " +
                                                       comboRoles.ClientObjectId + ".getSelectedItem().Text;\"></div>"));
            registerControl(generalView, string.Empty, rolesPanel);

            registerControl(generalView,
                            string.Empty, new LiteralControl("<em>" +
                                                             Localization.SecurityStrings.RolesTextBoxNote + "</em>"));

            #endregion

            #region Contact View

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

            TabStripTab contactTab = new TabStripTab();
            contactTab.Text       = Localization.PeopleStrings.ContactTab;
            contactTab.PageViewId = generalView.ID;
            tabstrip.Tabs.Add(contactTab);

            tbName                 = new TextBox();
            tbName.Width           = Unit.Pixel(200);
            tbName.EnableViewState = false;
            registerControl(contactView,
                            Localization.PeopleStrings.Name, tbName);

            tbAddress1                 = new TextBox();
            tbAddress1.Width           = Unit.Pixel(175);
            tbAddress1.EnableViewState = false;
            cbBadAddress               = new CheckBox();
            cbBadAddress.Text          = Localization.PeopleStrings.Invalid;
            registerControl(contactView,
                            Localization.PeopleStrings.Address, tbAddress1, cbBadAddress);

            tbAddress2                 = new TextBox();
            tbAddress2.Width           = Unit.Pixel(175);
            tbAddress2.EnableViewState = false;
            registerControl(contactView, string.Empty, tbAddress2);

            tbCity                 = new TextBox();
            tbCity.Width           = Unit.Pixel(175);
            tbCity.EnableViewState = false;
            registerControl(contactView,
                            Localization.PeopleStrings.City, tbCity);

            tbStateProvince                 = new TextBox();
            tbStateProvince.Width           = Unit.Pixel(175);
            tbStateProvince.EnableViewState = false;
            registerControl(contactView,
                            Localization.PeopleStrings.StateProvince, tbStateProvince);

            tbPostalCode                 = new TextBox();
            tbPostalCode.Width           = Unit.Pixel(175);
            tbPostalCode.EnableViewState = false;
            registerControl(contactView,
                            Localization.PeopleStrings.PostalCode, tbPostalCode);

            tbCountry                 = new TextBox();
            tbCountry.Width           = Unit.Pixel(175);
            tbCountry.EnableViewState = false;
            registerControl(contactView,
                            Localization.PeopleStrings.Country, tbCountry);

            tbHomePhone                 = new TextBox();
            tbHomePhone.Width           = Unit.Pixel(175);
            tbHomePhone.EnableViewState = false;
            cbBadHomePhone              = new CheckBox();
            cbBadHomePhone.Text         = Localization.PeopleStrings.Invalid;
            registerControl(contactView,
                            Localization.PeopleStrings.HomePhone, tbHomePhone, cbBadHomePhone);

            tbWorkPhone                 = new TextBox();
            tbWorkPhone.Width           = Unit.Pixel(175);
            tbWorkPhone.EnableViewState = false;
            cbBadWorkPhone              = new CheckBox();
            cbBadWorkPhone.Text         = Localization.PeopleStrings.Invalid;
            registerControl(contactView,
                            Localization.PeopleStrings.WorkPhone, tbWorkPhone, cbBadWorkPhone);

            tbMobilePhone                 = new TextBox();
            tbMobilePhone.Width           = Unit.Pixel(175);
            tbMobilePhone.EnableViewState = false;
            cbBadMobilePhone              = new CheckBox();
            cbBadMobilePhone.Text         = Localization.PeopleStrings.Invalid;
            registerControl(contactView,
                            Localization.PeopleStrings.MobilePhone, tbMobilePhone, cbBadMobilePhone);

            tbPager                 = new TextBox();
            tbPager.Width           = Unit.Pixel(175);
            tbPager.EnableViewState = false;
            registerControl(contactView,
                            Localization.PeopleStrings.Pager, tbPager);

            tbEmail1                 = new TextBox();
            tbEmail1.Width           = Unit.Pixel(175);
            tbEmail1.EnableViewState = false;
            cbBadEmail               = new CheckBox();
            cbBadEmail.Text          = Localization.PeopleStrings.Invalid;
            registerControl(contactView,
                            Localization.PeopleStrings.Email, tbEmail1, cbBadEmail);

            tbEmail2                 = new TextBox();
            tbEmail2.Width           = Unit.Pixel(175);
            tbEmail2.EnableViewState = false;
            registerControl(contactView,
                            Localization.PeopleStrings.Email2, tbEmail2);

            tbUrl                 = new TextBox();
            tbUrl.Width           = Unit.Pixel(175);
            tbUrl.EnableViewState = false;
            cbBadUrl              = new CheckBox();
            cbBadUrl.Text         = Localization.PeopleStrings.Invalid;
            registerControl(contactView,
                            Localization.PeopleStrings.WebsiteUrl, tbUrl, cbBadUrl);

            tbBirthDate                 = new TextBox();
            tbBirthDate.Width           = Unit.Pixel(175);
            tbBirthDate.EnableViewState = false;
            registerControl(contactView,
                            Localization.PeopleStrings.BirthDate, tbBirthDate);

            #endregion

            #region Memo View

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

            TabStripTab memoTab = new TabStripTab();
            memoTab.Text       = Localization.PeopleStrings.MemoTab;
            memoTab.PageViewId = generalView.ID;
            tabstrip.Tabs.Add(memoTab);

            tbMemoText                 = new TextBox();
            tbMemoText.TextMode        = TextBoxMode.MultiLine;
            tbMemoText.Rows            = 25;
            tbMemoText.Width           = Unit.Percentage(100);
            tbMemoText.EnableViewState = false;
            registerControl(memoView,
                            Localization.PeopleStrings.Memo, tbMemoText);

            #endregion

            #region Buttons

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

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

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

            #endregion

            bind();

            ChildControlsCreated = true;
        }