예제 #1
0
 private void WriteSuccessTextPanel(HtmlTextWriter writer, ChangePassword changePwd)
 {
     if (!String.IsNullOrEmpty(changePwd.SuccessText))
     {
         string className = (changePwd.SuccessTextStyle != null) && (!String.IsNullOrEmpty(changePwd.SuccessTextStyle.CssClass)) ? changePwd.SuccessTextStyle.CssClass + " " : "";
         className += "AspNet-ChangePassword-SuccessTextPanel";
         WebControlAdapterExtender.WriteBeginDiv(writer, className, "");
         WebControlAdapterExtender.WriteSpan(writer, "", changePwd.SuccessText);
         WebControlAdapterExtender.WriteEndDiv(writer);
     }
 }
예제 #2
0
        private void WritePasswordPanel(HtmlTextWriter writer, ChangePassword changePwd)
        {
            TextBox textbox = changePwd.ChangePasswordTemplateContainer.FindControl("CurrentPassword") as TextBox;

            if (textbox != null)
            {
                Page.ClientScript.RegisterForEventValidation(textbox.UniqueID);
                WebControlAdapterExtender.WriteBeginDiv(writer, "AspNet-ChangePassword-PasswordPanel", "");
                Extender.WriteTextBox(writer, true, changePwd.LabelStyle.CssClass, changePwd.PasswordLabelText, changePwd.TextBoxStyle.CssClass, changePwd.ChangePasswordTemplateContainer.ID + "_CurrentPassword", "");
                WebControlAdapterExtender.WriteRequiredFieldValidator(writer, changePwd.ChangePasswordTemplateContainer.FindControl("CurrentPasswordRequired") as RequiredFieldValidator, changePwd.ValidatorTextStyle.CssClass, "CurrentPassword", changePwd.PasswordRequiredErrorMessage);
                WebControlAdapterExtender.WriteEndDiv(writer);
            }
        }
        private void WriteContinuePanel(HtmlTextWriter writer, CreateUserWizard wizard)
        {
            string  id         = "ContinueButton";
            string  idWithType = WebControlAdapterExtender.MakeIdWithButtonType(id, wizard.ContinueButtonType);
            Control btn        = wizard.FindControl("CompleteStepContainer").FindControl(idWithType);

            if (btn != null)
            {
                Page.ClientScript.RegisterForEventValidation(btn.UniqueID);
                WebControlAdapterExtender.WriteBeginDiv(writer, "AspNet-CreateUserWizard-ContinuePanel", "");
                Extender.WriteSubmit(writer, wizard.ContinueButtonType, wizard.ContinueButtonStyle.CssClass, "CompleteStepContainer_ContinueButton", wizard.ContinueButtonImageUrl, "", wizard.ContinueButtonText);
                WebControlAdapterExtender.WriteEndDiv(writer);
            }
        }
        private void WriteEmailPanel(HtmlTextWriter writer, CreateUserWizard wizard)
        {
            TextBox textBox = wizard.FindControl("CreateUserStepContainer").FindControl("Email") as TextBox;

            if (textBox != null)
            {
                Page.ClientScript.RegisterForEventValidation(textBox.UniqueID);

                WebControlAdapterExtender.WriteBeginDiv(writer, "AspNet-CreateUserWizard-EmailPanel", "");
                Extender.WriteTextBox(writer, false, wizard.LabelStyle.CssClass, wizard.EmailLabelText, wizard.TextBoxStyle.CssClass, "CreateUserStepContainer_Email", "");
                WebControlAdapterExtender.WriteRequiredFieldValidator(writer, wizard.FindControl("CreateUserStepContainer").FindControl("EmailRequired") as RequiredFieldValidator, wizard.ValidatorTextStyle.CssClass, "Email", wizard.EmailRequiredErrorMessage);
                WebControlAdapterExtender.WriteEndDiv(writer);
            }
        }
        private void WriteAnswerPanel(HtmlTextWriter writer, CreateUserWizard wizard)
        {
            if ((WizardMembershipProvider != null) && WizardMembershipProvider.RequiresQuestionAndAnswer)
            {
                TextBox textBox = wizard.FindControl("CreateUserStepContainer").FindControl("Answer") as TextBox;
                if (textBox != null)
                {
                    Page.ClientScript.RegisterForEventValidation(textBox.UniqueID);

                    WebControlAdapterExtender.WriteBeginDiv(writer, "AspNet-CreateUserWizard-AnswerPanel", "");
                    Extender.WriteTextBox(writer, false, wizard.LabelStyle.CssClass, wizard.AnswerLabelText, wizard.TextBoxStyle.CssClass, "CreateUserStepContainer_Answer", "");
                    WebControlAdapterExtender.WriteRequiredFieldValidator(writer, wizard.FindControl("CreateUserStepContainer").FindControl("AnswerRequired") as RequiredFieldValidator, wizard.ValidatorTextStyle.CssClass, "Answer", wizard.AnswerRequiredErrorMessage);
                    WebControlAdapterExtender.WriteEndDiv(writer);
                }
            }
        }
예제 #6
0
        private void WriteContinuePanel(HtmlTextWriter writer, ChangePassword changePwd)
        {
            WebControlAdapterExtender.WriteBeginDiv(writer, "AspNet-ChangePassword-ContinuePanel", "");

            string id = "Continue";

            id += (changePwd.ChangePasswordButtonType == ButtonType.Button) ? "Push" : "";
            string  idWithType = WebControlAdapterExtender.MakeIdWithButtonType(id, changePwd.ContinueButtonType);
            Control btn        = changePwd.SuccessTemplateContainer.FindControl(idWithType);

            if (btn != null)
            {
                Page.ClientScript.RegisterForEventValidation(btn.UniqueID);
                Extender.WriteSubmit(writer, changePwd.ContinueButtonType, changePwd.ContinueButtonStyle.CssClass, changePwd.SuccessTemplateContainer.ID + "_" + id, changePwd.ContinueButtonImageUrl, "", changePwd.ContinueButtonText);
            }

            WebControlAdapterExtender.WriteEndDiv(writer);
        }