本文整理汇总了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);
}
}
}
示例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);
}
}
示例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);
}
}
}
示例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);
}
示例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);
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}