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); } } }
/// <summary> /// Writes the submit panel. /// </summary> /// <param name="writer"> /// The writer. /// </param> /// <param name="login"> /// The login. /// </param> /// <remarks> /// </remarks> private void WriteSubmitPanel(HtmlTextWriter writer, Login login) { var id = "Login"; var idWithType = WebControlAdapterExtender.MakeIdWithButtonType(id, login.LoginButtonType); var btn = login.FindControl(idWithType); if (btn == null) { return; } this.Page.ClientScript.RegisterForEventValidation(btn.UniqueID); WebControlAdapterExtender.WriteBeginDiv(writer, "AspNet-Login-SubmitPanel", string.Empty); var options = new PostBackOptions( btn, string.Empty, string.Empty, false, false, false, true, true, login.UniqueID); var javascript = "javascript:" + this.Page.ClientScript.GetPostBackEventReference(options); javascript = this.Page.Server.HtmlEncode(javascript); this.Extender.WriteSubmit( writer, login.LoginButtonType, login.LoginButtonStyle.CssClass, id, login.LoginButtonImageUrl, javascript, login.LoginButtonText); WebControlAdapterExtender.WriteEndDiv(writer); }
private void WriteSubmitPanel(HtmlTextWriter writer, ChangePassword changePwd) { WebControlAdapterExtender.WriteBeginDiv(writer, "AspNet-ChangePassword-SubmitPanel"); string id = "ChangePassword"; id += (changePwd.ChangePasswordButtonType == ButtonType.Button) ? "Push" : ""; string idWithType = WebControlAdapterExtender.MakeIdWithButtonType(id, changePwd.ChangePasswordButtonType); Control btn = changePwd.ChangePasswordTemplateContainer.FindControl(idWithType); if (btn != null) { Page.ClientScript.RegisterForEventValidation(btn.UniqueID); PostBackOptions options = new PostBackOptions(btn, "", "", false, false, false, false, true, changePwd.UniqueID); string javascript = "javascript:" + Page.ClientScript.GetPostBackEventReference(options); javascript = Page.Server.HtmlEncode(javascript); Extender.WriteSubmit(writer, changePwd.ChangePasswordButtonType, changePwd.ChangePasswordButtonStyle.CssClass, changePwd.ChangePasswordTemplateContainer.ID + "_" + id, changePwd.ChangePasswordButtonImageUrl, javascript, changePwd.ChangePasswordButtonText); } id = "Cancel"; id += (changePwd.ChangePasswordButtonType == ButtonType.Button) ? "Push" : ""; idWithType = WebControlAdapterExtender.MakeIdWithButtonType(id, changePwd.CancelButtonType); btn = changePwd.ChangePasswordTemplateContainer.FindControl(idWithType); if (btn != null) { Page.ClientScript.RegisterForEventValidation(btn.UniqueID); Extender.WriteSubmit(writer, changePwd.CancelButtonType, changePwd.CancelButtonStyle.CssClass, changePwd.ChangePasswordTemplateContainer.ID + "_" + id, changePwd.CancelButtonImageUrl, "", changePwd.CancelButtonText); } WebControlAdapterExtender.WriteEndDiv(writer); }
/// <summary> /// Writes the continue panel. /// </summary> /// <param name="writer"> /// The writer. /// </param> /// <param name="changePwd"> /// The change PWD. /// </param> /// <remarks> /// </remarks> private void WriteContinuePanel(HtmlTextWriter writer, ChangePassword changePwd) { WebControlAdapterExtender.WriteBeginDiv(writer, "AspNet-ChangePassword-ContinuePanel", string.Empty); var id = "Continue"; id += (changePwd.ChangePasswordButtonType == ButtonType.Button) ? "Push" : string.Empty; var idWithType = WebControlAdapterExtender.MakeIdWithButtonType(id, changePwd.ContinueButtonType); var btn = changePwd.SuccessTemplateContainer.FindControl(idWithType); if (btn != null) { this.Page.ClientScript.RegisterForEventValidation(btn.UniqueID); this.Extender.WriteSubmit( writer, changePwd.ContinueButtonType, changePwd.ContinueButtonStyle.CssClass, changePwd.SuccessTemplateContainer.ID + "_" + id, changePwd.ContinueButtonImageUrl, string.Empty, changePwd.ContinueButtonText); } WebControlAdapterExtender.WriteEndDiv(writer); }
/// <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); }
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 WriteSubmitPanel(HtmlTextWriter writer, PasswordRecovery passwordRecovery) { if ((_state == State.UserName) || (_state == State.UserLookupError)) { Control container = passwordRecovery.UserNameTemplateContainer; string id = (container != null) ? container.ID + "_Submit" : "Submit"; string idWithType = WebControlAdapterExtender.MakeIdWithButtonType("Submit", passwordRecovery.SubmitButtonType); Control btn = (container != null) ? container.FindControl(idWithType) as Control : null; if (btn != null) { Page.ClientScript.RegisterForEventValidation(btn.UniqueID); PostBackOptions options = new PostBackOptions(btn, "", "", false, false, false, false, true, passwordRecovery.UniqueID); string javascript = "javascript:" + Page.ClientScript.GetPostBackEventReference(options); javascript = Page.Server.HtmlEncode(javascript); WebControlAdapterExtender.WriteBeginDiv(writer, "AspNet-PasswordRecovery-UserName-SubmitPanel"); Extender.WriteSubmit(writer, passwordRecovery.SubmitButtonType, passwordRecovery.SubmitButtonStyle.CssClass, id, passwordRecovery.SubmitButtonImageUrl, javascript, passwordRecovery.SubmitButtonText); WebControlAdapterExtender.WriteEndDiv(writer); } } else if ((_state == State.Question) || (_state == State.AnswerLookupError)) { Control container = passwordRecovery.QuestionTemplateContainer; string id = (container != null) ? container.ID + "_Submit" : "Submit"; string idWithType = WebControlAdapterExtender.MakeIdWithButtonType("Submit", passwordRecovery.SubmitButtonType); Control btn = (container != null) ? container.FindControl(idWithType) as Control : null; if (btn != null) { Page.ClientScript.RegisterForEventValidation(btn.UniqueID); PostBackOptions options = new PostBackOptions(btn, "", "", false, false, false, false, true, passwordRecovery.UniqueID); string javascript = "javascript:" + Page.ClientScript.GetPostBackEventReference(options); javascript = Page.Server.HtmlEncode(javascript); WebControlAdapterExtender.WriteBeginDiv(writer, "AspNet-PasswordRecovery-Question-SubmitPanel"); Extender.WriteSubmit(writer, passwordRecovery.SubmitButtonType, passwordRecovery.SubmitButtonStyle.CssClass, id, passwordRecovery.SubmitButtonImageUrl, javascript, passwordRecovery.SubmitButtonText); WebControlAdapterExtender.WriteEndDiv(writer); } } }
private void WriteSubmitPanel(HtmlTextWriter writer, Login login) { string id = "Login"; string idWithType = WebControlAdapterExtender.MakeIdWithButtonType(id, login.LoginButtonType); Control btn = login.FindControl(idWithType); if (btn != null) { Page.ClientScript.RegisterForEventValidation(btn.UniqueID); WebControlAdapterExtender.WriteBeginDiv(writer, "AspNet-Login-SubmitPanel"); PostBackOptions options = new PostBackOptions(btn, "", "", false, false, false, false, true, login.UniqueID); string javascript = "javascript:" + Page.ClientScript.GetPostBackEventReference(options); javascript = Page.Server.HtmlEncode(javascript); Extender.WriteSubmit(writer, login.LoginButtonType, login.LoginButtonStyle.CssClass, id, login.LoginButtonImageUrl, javascript, login.LoginButtonText); WebControlAdapterExtender.WriteEndDiv(writer); } }
/// <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); }