当前位置: 首页>>代码示例>>C#>>正文


C# CreateUserWizard.FindControl方法代码示例

本文整理汇总了C#中System.Web.UI.WebControls.CreateUserWizard.FindControl方法的典型用法代码示例。如果您正苦于以下问题:C# CreateUserWizard.FindControl方法的具体用法?C# CreateUserWizard.FindControl怎么用?C# CreateUserWizard.FindControl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Web.UI.WebControls.CreateUserWizard的用法示例。


在下文中一共展示了CreateUserWizard.FindControl方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: WriteCreateUserButtonPanel

        private void WriteCreateUserButtonPanel(HtmlTextWriter writer, CreateUserWizard wizard)
        {
            Control btnParentCtrl = wizard.FindControl("__CustomNav0");
            if (btnParentCtrl != null)
            {
                string id = "_CustomNav0_StepNextButton";
                string idWithType = WebControlAdapterExtender.MakeIdWithButtonType("StepNextButton", wizard.CreateUserButtonType);
                Control btn = btnParentCtrl.FindControl(idWithType);
                if (btn != null)
                {
                    Page.ClientScript.RegisterForEventValidation(btn.UniqueID);

                    PostBackOptions options = new PostBackOptions(btn, "", "", false, false, false, false, true, wizard.ID);
                    string javascript = "javascript:" + Page.ClientScript.GetPostBackEventReference(options);
                    javascript = Page.Server.HtmlEncode(javascript);

                    WebControlAdapterExtender.WriteBeginDiv(writer, "AspNet-CreateUserWizard-CreateUserButtonPanel");

                    Extender.WriteSubmit(writer, wizard.CreateUserButtonType, wizard.CreateUserButtonStyle.CssClass, id, wizard.CreateUserButtonImageUrl, javascript, wizard.CreateUserButtonText);

                    if (wizard.DisplayCancelButton)
                    {
                        Extender.WriteSubmit(writer, wizard.CancelButtonType, wizard.CancelButtonStyle.CssClass, "_CustomNav0_CancelButton", wizard.CancelButtonImageUrl, "", wizard.CancelButtonText);
                    }

                    WebControlAdapterExtender.WriteEndDiv(writer);
                }
            }
        }
开发者ID:jordan49,项目名称:websitepanel,代码行数:29,代码来源:CreateUserWizardAdapter.cs

示例2: WriteContinuePanel

 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);
     }
 }
开发者ID:jordan49,项目名称:websitepanel,代码行数:13,代码来源:CreateUserWizardAdapter.cs

示例3: WriteAnswerPanel

        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);
                }
            }
        }
开发者ID:jordan49,项目名称:websitepanel,代码行数:16,代码来源:CreateUserWizardAdapter.cs

示例4: WriteFinalValidators

 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);
 }
开发者ID:jordan49,项目名称:websitepanel,代码行数:8,代码来源:CreateUserWizardAdapter.cs

示例5: WriteEmailPanel

        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);
            }
        }
开发者ID:jordan49,项目名称:websitepanel,代码行数:13,代码来源:CreateUserWizardAdapter.cs

示例6: WriteUserPanel

        /// <summary>
        /// Writes the user panel.
        /// </summary>
        /// <param name="writer">
        /// The writer.
        /// </param>
        /// <param name="wizard">
        /// The wizard.
        /// </param>
        /// <remarks>
        /// </remarks>
        private void WriteUserPanel(HtmlTextWriter writer, CreateUserWizard wizard)
        {
            var textBox = wizard.FindControl("CreateUserStepContainer").FindControl("UserName") as TextBox;
            if (textBox == null)
            {
                return;
            }

            this.Page.ClientScript.RegisterForEventValidation(textBox.UniqueID);

            WebControlAdapterExtender.WriteBeginDiv(writer, "AspNet-CreateUserWizard-UserPanel", string.Empty);
            this.Extender.WriteTextBox(
                writer,
                false,
                wizard.LabelStyle.CssClass,
                wizard.UserNameLabelText,
                wizard.TextBoxStyle.CssClass,
                "CreateUserStepContainer_UserName",
                wizard.UserName);
            WebControlAdapterExtender.WriteRequiredFieldValidator(
                writer,
                wizard.FindControl("CreateUserStepContainer").FindControl("UserNameRequired") as RequiredFieldValidator,
                wizard.ValidatorTextStyle.CssClass,
                "UserName",
                wizard.UserNameRequiredErrorMessage);
            WebControlAdapterExtender.WriteEndDiv(writer);
        }
开发者ID:divyang4481,项目名称:appleseedapp,代码行数:38,代码来源:CreateUserWizardAdapter.cs

示例7: WriteQuestionPanel

        /// <summary>
        /// Writes the question panel.
        /// </summary>
        /// <param name="writer">
        /// The writer.
        /// </param>
        /// <param name="wizard">
        /// The wizard.
        /// </param>
        /// <remarks>
        /// </remarks>
        private void WriteQuestionPanel(HtmlTextWriter writer, CreateUserWizard wizard)
        {
            if ((this.WizardMembershipProvider == null) || !this.WizardMembershipProvider.RequiresQuestionAndAnswer)
            {
                return;
            }

            var textBox = wizard.FindControl("CreateUserStepContainer").FindControl("Question") as TextBox;
            if (textBox == null)
            {
                return;
            }

            this.Page.ClientScript.RegisterForEventValidation(textBox.UniqueID);

            WebControlAdapterExtender.WriteBeginDiv(writer, "AspNet-CreateUserWizard-QuestionPanel", string.Empty);
            this.Extender.WriteTextBox(
                writer,
                false,
                wizard.LabelStyle.CssClass,
                wizard.QuestionLabelText,
                wizard.TextBoxStyle.CssClass,
                "CreateUserStepContainer_Question",
                string.Empty);
            WebControlAdapterExtender.WriteRequiredFieldValidator(
                writer,
                wizard.FindControl("CreateUserStepContainer").FindControl("QuestionRequired") as RequiredFieldValidator,
                wizard.ValidatorTextStyle.CssClass,
                "Question",
                wizard.QuestionRequiredErrorMessage);
            WebControlAdapterExtender.WriteEndDiv(writer);
        }
开发者ID:divyang4481,项目名称:appleseedapp,代码行数:43,代码来源:CreateUserWizardAdapter.cs

示例8: WriteCreateUserButtonPanel

        /// <summary>
        /// Writes the create user button panel.
        /// </summary>
        /// <param name="writer">
        /// The writer.
        /// </param>
        /// <param name="wizard">
        /// The wizard.
        /// </param>
        /// <remarks>
        /// </remarks>
        private void WriteCreateUserButtonPanel(HtmlTextWriter writer, CreateUserWizard wizard)
        {
            var btnParentCtrl = wizard.FindControl("__CustomNav0");
            if (btnParentCtrl == null)
            {
                return;
            }

            const string Id = "_CustomNav0_StepNextButton";
            var idWithType = WebControlAdapterExtender.MakeIdWithButtonType(
                "StepNextButton", wizard.CreateUserButtonType);
            var btn = btnParentCtrl.FindControl(idWithType);
            if (btn == null)
            {
                return;
            }

            this.Page.ClientScript.RegisterForEventValidation(btn.UniqueID);

            var options = new PostBackOptions(
                btn, string.Empty, string.Empty, false, false, false, true, true, wizard.ID);
            var javascript = "javascript:" + this.Page.ClientScript.GetPostBackEventReference(options);
            javascript = this.Page.Server.HtmlEncode(javascript);

            WebControlAdapterExtender.WriteBeginDiv(
                writer, "AspNet-CreateUserWizard-CreateUserButtonPanel", string.Empty);

            this.Extender.WriteSubmit(
                writer,
                wizard.CreateUserButtonType,
                wizard.CreateUserButtonStyle.CssClass,
                Id,
                wizard.CreateUserButtonImageUrl,
                javascript,
                wizard.CreateUserButtonText);

            if (wizard.DisplayCancelButton)
            {
                this.Extender.WriteSubmit(
                    writer,
                    wizard.CancelButtonType,
                    wizard.CancelButtonStyle.CssClass,
                    "_CustomNav0_CancelButton",
                    wizard.CancelButtonImageUrl,
                    string.Empty,
                    wizard.CancelButtonText);
            }

            WebControlAdapterExtender.WriteEndDiv(writer);
        }
开发者ID:divyang4481,项目名称:appleseedapp,代码行数:61,代码来源:CreateUserWizardAdapter.cs

示例9: WriteContinuePanel

        /// <summary>
        /// Writes the continue panel.
        /// </summary>
        /// <param name="writer">
        /// The writer.
        /// </param>
        /// <param name="wizard">
        /// The wizard.
        /// </param>
        /// <remarks>
        /// </remarks>
        private void WriteContinuePanel(HtmlTextWriter writer, CreateUserWizard wizard)
        {
            const string Id = "ContinueButton";
            var idWithType = WebControlAdapterExtender.MakeIdWithButtonType(Id, wizard.ContinueButtonType);
            var btn = wizard.FindControl("CompleteStepContainer").FindControl(idWithType);
            if (btn == null)
            {
                return;
            }

            this.Page.ClientScript.RegisterForEventValidation(btn.UniqueID);
            WebControlAdapterExtender.WriteBeginDiv(writer, "AspNet-CreateUserWizard-ContinuePanel", string.Empty);
            this.Extender.WriteSubmit(
                writer,
                wizard.ContinueButtonType,
                wizard.ContinueButtonStyle.CssClass,
                "CompleteStepContainer_ContinueButton",
                wizard.ContinueButtonImageUrl,
                string.Empty,
                wizard.ContinueButtonText);
            WebControlAdapterExtender.WriteEndDiv(writer);
        }
开发者ID:divyang4481,项目名称:appleseedapp,代码行数:33,代码来源:CreateUserWizardAdapter.cs


注:本文中的System.Web.UI.WebControls.CreateUserWizard.FindControl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。