private void WriteFinalValidators(HtmlTextWriter writer, CreateUserWizard wizard)
 {
     WebControlAdapterExtender.WriteBeginDiv(writer, "AspNet-CreateUserWizard-FinalValidatorsPanel", "");
     WebControlAdapterExtender.WriteCompareValidator(writer, wizard.FindControl("CreateUserStepContainer").FindControl("PasswordCompare") as CompareValidator, wizard.ValidatorTextStyle.CssClass, "ConfirmPassword", wizard.ConfirmPasswordCompareErrorMessage, "Password");
     WebControlAdapterExtender.WriteRegularExpressionValidator(writer, wizard.FindControl("CreateUserStepContainer").FindControl("PasswordRegExpValidator") as RegularExpressionValidator, wizard.ValidatorTextStyle.CssClass, "Password", wizard.PasswordRegularExpressionErrorMessage, wizard.PasswordRegularExpression);
     WebControlAdapterExtender.WriteRegularExpressionValidator(writer, wizard.FindControl("CreateUserStepContainer").FindControl("EmailRegExpValidator") as RegularExpressionValidator, wizard.ValidatorTextStyle.CssClass, "Email", wizard.EmailRegularExpressionErrorMessage, wizard.EmailRegularExpression);
     WebControlAdapterExtender.WriteEndDiv(writer);
 }
Пример #2
0
        private void WriteNewPasswordPanel(HtmlTextWriter writer, ChangePassword changePwd)
        {
            TextBox textbox = changePwd.ChangePasswordTemplateContainer.FindControl("NewPassword") as TextBox;

            if (textbox != null)
            {
                Page.ClientScript.RegisterForEventValidation(textbox.UniqueID);
                WebControlAdapterExtender.WriteBeginDiv(writer, "AspNet-ChangePassword-NewPasswordPanel", "");
                Extender.WriteTextBox(writer, true, changePwd.LabelStyle.CssClass, changePwd.NewPasswordLabelText, changePwd.TextBoxStyle.CssClass, changePwd.ChangePasswordTemplateContainer.ID + "_NewPassword", "");
                WebControlAdapterExtender.WriteRequiredFieldValidator(writer, changePwd.ChangePasswordTemplateContainer.FindControl("NewPasswordRequired") as RequiredFieldValidator, changePwd.ValidatorTextStyle.CssClass, "NewPassword", changePwd.NewPasswordRequiredErrorMessage);
                WebControlAdapterExtender.WriteRegularExpressionValidator(writer, changePwd.ChangePasswordTemplateContainer.FindControl("RegExpValidator") as RegularExpressionValidator, changePwd.ValidatorTextStyle.CssClass, "NewPassword", changePwd.NewPasswordRegularExpressionErrorMessage, changePwd.NewPasswordRegularExpression);
                WebControlAdapterExtender.WriteEndDiv(writer);
            }
        }