From 0556cbae274dbe64daa43799897cecbaee6a5061 Mon Sep 17 00:00:00 2001 From: ccoulson Date: Sun, 20 Jan 2013 13:56:52 -0500 Subject: [PATCH] Moved adding of Password Recovery Control to OnInit, as it wasn't working properly from CreateChildControls if RequiresQuestionAnswer was true on SharePoint 2013/.Net 4.0 --- .../PasswordRecoveryWebPart/PasswordRecoveryWebPart.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Visigo.Sharepoint.FormsBasedAuthentication/Visigo.Sharepoint.FormsBasedAuthentication/PasswordRecoveryWebPart/PasswordRecoveryWebPart.cs b/Visigo.Sharepoint.FormsBasedAuthentication/Visigo.Sharepoint.FormsBasedAuthentication/PasswordRecoveryWebPart/PasswordRecoveryWebPart.cs index 7333f49..0868418 100644 --- a/Visigo.Sharepoint.FormsBasedAuthentication/Visigo.Sharepoint.FormsBasedAuthentication/PasswordRecoveryWebPart/PasswordRecoveryWebPart.cs +++ b/Visigo.Sharepoint.FormsBasedAuthentication/Visigo.Sharepoint.FormsBasedAuthentication/PasswordRecoveryWebPart/PasswordRecoveryWebPart.cs @@ -484,10 +484,16 @@ private void SendEmail() }); } - protected override void CreateChildControls() + //protected override void CreateChildControls() + //{ + // AddPasswordRecoveryControl(); + // base.CreateChildControls(); + //} + + protected override void OnInit(EventArgs e) { + base.OnInit(e); AddPasswordRecoveryControl(); - base.CreateChildControls(); } protected override void RenderContents(HtmlTextWriter writer)