public override void CreateChildControls()
        {
            // If user trying to visit settings screen, they must be logged on
            if (_userAction == "settings" && LoggedOnUserID == 0)
                RedirectToLoginPage();

            // Alias text box
            _aliasTextBox = new TextBox();
            _aliasTextBox.ID = "_aliasTextBox";
            _aliasTextBox.Width = Unit.Pixel(150);
            _aliasTextBox.MaxLength = 100;
            _aliasTextBox.CssClass = "WebSolutionFormControl";

            // Alias validator
            _aliasValidator = new ValidAlias();
            _aliasValidator.ControlToValidate = "_aliasTextBox";
            _aliasValidator.CssClass = "WebSolutionFormControl";

            // Email entry row
            _emailTextBox = new TextBox();
            _emailTextBox.ID = "_emailTextBox";
            _emailTextBox.Width = Unit.Pixel(150);
            _emailTextBox.MaxLength = 100;
            _emailTextBox.CssClass = "WebSolutionFormControl";

            // Email validator
            _emailValidator = new ValidEmail();
            _emailValidator.ControlToValidate = "_emailTextBox";
            _emailValidator.CssClass = "WebSolutionFormControl";

            // CHANGED by Arthur Zaczek
            /**
            // Password entry row
            _passwordTextBox = new TextBox();
            _passwordTextBox.ID = "_passwordTextBox";
            _passwordTextBox.Width = Unit.Pixel(150);
            _passwordTextBox.MaxLength = 50;
            _passwordTextBox.TextMode = TextBoxMode.Password;
            _passwordTextBox.CssClass = "WebSolutionFormControl";

            // Password validator
            _passwordValidator = new ValidPassword();
            _passwordValidator.ControlToValidate = "_passwordTextBox";
            _passwordValidator.CssClass = "WebSolutionFormControl";

            // Password confirm entry row
            _confirmTextBox = new TextBox();
            _confirmTextBox.ID = "_confirmTextBox";
            _confirmTextBox.Width = Unit.Pixel(150);
            _confirmTextBox.MaxLength = 50;
            _confirmTextBox.TextMode = TextBoxMode.Password;
            _confirmTextBox.CssClass = "WebSolutionFormControl";*/

            // Confirm validator
            _confirmValidator = new CompareValidator();
            _confirmValidator.CssClass = "WebSolutionFormControl";
            _confirmValidator.ControlToValidate = "_confirmTextBox";
            _confirmValidator.ControlToCompare = "_passwordTextBox";
            _confirmValidator.ErrorMessage = "Passwords must be identical.";
            _confirmValidator.Display = ValidatorDisplay.Dynamic;

            /*			// Confirm required field validator
            _confirmRequiredValidator = new RequiredFieldValidator();
            _confirmRequiredValidator.CssClass = "WebSolutionFormControl";
            _confirmRequiredValidator.ControlToValidate = "_confirmTextBox";
            _confirmRequiredValidator.ErrorMessage = "Please enter a password.";
            _confirmRequiredValidator.Display = ValidatorDisplay.Dynamic;*/

            // Remember me check box
            _rememberMeCheckBox = new CheckBox();
            _rememberMeCheckBox.Text = "Remember me";
            _rememberMeCheckBox.CssClass = "WebSolutionFormControl";

            // Submit button
            _submitButton = new Button();
            _submitButton.Text = _userAction == "settings" ? "Save" : "Create Account";
            _submitButton.Click += new System.EventHandler(SubmitButton_Click);
            _submitButton.CssClass = "WebSolutionFormControl";

            // Avatar
            _inputFile = new HtmlInputFile();
            _inputFile.ID = "_inputFile";

            // Avatar validator
            _avatarValidator = new ValidAvatar();
            _avatarValidator.ControlToValidate = "_inputFile";
            _avatarValidator.InputFile = _inputFile;
            _avatarValidator.CssClass = "WebSolutionFormControl";

            // Add child controls
            Controls.Add(_aliasTextBox);
            Controls.Add(_aliasValidator);
            Controls.Add(_emailTextBox);
            Controls.Add(_emailValidator);
            //			Controls.Add(_passwordTextBox);
            //			Controls.Add(_passwordValidator);
            //			Controls.Add(_confirmTextBox);
            //			Controls.Add(_confirmValidator);
            //			Controls.Add(_confirmRequiredValidator);
            Controls.Add(_rememberMeCheckBox);
            Controls.Add(_submitButton);
            Controls.Add(_inputFile);
            Controls.Add(_avatarValidator);

            // Populate controls with user settings?
            if (_userAction == "settings")
                PopulateUserSettings();
        }
        public override void CreateChildControls()
        {
            // If user trying to visit settings screen, they must be logged on
            if (_userAction == "settings" && LoggedOnUserID == 0)
            {
                RedirectToLoginPage();
            }

            // Alias text box
            _aliasTextBox           = new TextBox();
            _aliasTextBox.ID        = "_aliasTextBox";
            _aliasTextBox.Width     = Unit.Pixel(150);
            _aliasTextBox.MaxLength = 100;
            _aliasTextBox.CssClass  = "WebSolutionFormControl";

            // Alias validator
            _aliasValidator = new ValidAlias();
            _aliasValidator.ControlToValidate = "_aliasTextBox";
            _aliasValidator.CssClass          = "WebSolutionFormControl";

            // Email entry row
            _emailTextBox           = new TextBox();
            _emailTextBox.ID        = "_emailTextBox";
            _emailTextBox.Width     = Unit.Pixel(150);
            _emailTextBox.MaxLength = 100;
            _emailTextBox.CssClass  = "WebSolutionFormControl";

            // Email validator
            _emailValidator = new ValidEmail();
            _emailValidator.ControlToValidate = "_emailTextBox";
            _emailValidator.CssClass          = "WebSolutionFormControl";

            // CHANGED by Arthur Zaczek

/**
 *                      // Password entry row
 *                      _passwordTextBox = new TextBox();
 *                      _passwordTextBox.ID = "_passwordTextBox";
 *                      _passwordTextBox.Width = Unit.Pixel(150);
 *                      _passwordTextBox.MaxLength = 50;
 *                      _passwordTextBox.TextMode = TextBoxMode.Password;
 *                      _passwordTextBox.CssClass = "WebSolutionFormControl";
 *
 *                      // Password validator
 *                      _passwordValidator = new ValidPassword();
 *                      _passwordValidator.ControlToValidate = "_passwordTextBox";
 *                      _passwordValidator.CssClass = "WebSolutionFormControl";
 *
 *                      // Password confirm entry row
 *                      _confirmTextBox = new TextBox();
 *                      _confirmTextBox.ID = "_confirmTextBox";
 *                      _confirmTextBox.Width = Unit.Pixel(150);
 *                      _confirmTextBox.MaxLength = 50;
 *                      _confirmTextBox.TextMode = TextBoxMode.Password;
 *                      _confirmTextBox.CssClass = "WebSolutionFormControl";*/

            // Confirm validator
            _confirmValidator                   = new CompareValidator();
            _confirmValidator.CssClass          = "WebSolutionFormControl";
            _confirmValidator.ControlToValidate = "_confirmTextBox";
            _confirmValidator.ControlToCompare  = "_passwordTextBox";
            _confirmValidator.ErrorMessage      = "Passwords must be identical.";
            _confirmValidator.Display           = ValidatorDisplay.Dynamic;

/*			// Confirm required field validator
 *                      _confirmRequiredValidator = new RequiredFieldValidator();
 *                      _confirmRequiredValidator.CssClass = "WebSolutionFormControl";
 *                      _confirmRequiredValidator.ControlToValidate = "_confirmTextBox";
 *                      _confirmRequiredValidator.ErrorMessage = "Please enter a password.";
 *                      _confirmRequiredValidator.Display = ValidatorDisplay.Dynamic;*/

            // Remember me check box
            _rememberMeCheckBox          = new CheckBox();
            _rememberMeCheckBox.Text     = "Remember me";
            _rememberMeCheckBox.CssClass = "WebSolutionFormControl";

            // Submit button
            _submitButton          = new Button();
            _submitButton.Text     = _userAction == "settings" ? "Save" : "Create Account";
            _submitButton.Click   += new System.EventHandler(SubmitButton_Click);
            _submitButton.CssClass = "WebSolutionFormControl";

            // Avatar
            _inputFile    = new HtmlInputFile();
            _inputFile.ID = "_inputFile";

            // Avatar validator
            _avatarValidator = new ValidAvatar();
            _avatarValidator.ControlToValidate = "_inputFile";
            _avatarValidator.InputFile         = _inputFile;
            _avatarValidator.CssClass          = "WebSolutionFormControl";

            // Add child controls
            Controls.Add(_aliasTextBox);
            Controls.Add(_aliasValidator);
            Controls.Add(_emailTextBox);
            Controls.Add(_emailValidator);
//			Controls.Add(_passwordTextBox);
//			Controls.Add(_passwordValidator);
//			Controls.Add(_confirmTextBox);
//			Controls.Add(_confirmValidator);
//			Controls.Add(_confirmRequiredValidator);
            Controls.Add(_rememberMeCheckBox);
            Controls.Add(_submitButton);
            Controls.Add(_inputFile);
            Controls.Add(_avatarValidator);

            // Populate controls with user settings?
            if (_userAction == "settings")
            {
                PopulateUserSettings();
            }
        }