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, true, 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); } } }
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, true, 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); }
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 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); }