asp.netvb.netlabelcode-behindcreateuserwizard

Display message after account created


I'm having Create User Wizard inside an update panel and here is how I have done:

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:CreateUserWizard ID="CreateUserWizard1" runat="server"
                    DisableCreatedUser="True"
                    ContinueDestinationPageUrl="~/Login.aspx" MailDefinition-BodyFileName="~/EmailTemplates/NewAccountTemplate.htm" LoginCreatedUser="False">
<ContinueButtonStyle BorderStyle="None" CssClass="bar g-button g-button-submit" Font-Size="12px" />
<CreateUserButtonStyle CssClass="foo g-button g-button-red" Height="30px"
                        Width="125px" BorderStyle="None" Font-Size="12px" />

<MailDefinition BodyFileName="~/EmailTemplates/NewAccountTemplate.htm" From="no-reply@mihirauniverse.org" IsBodyHtml="True" Priority="High">
</MailDefinition>

<WizardSteps>
<asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server">
<ContentTemplate>
<table>
========//Some code here
<tr>
<td>
<asp:Label ID="confirmmsg" runat="server" Text=""></asp:Label>
</td>
</table>
<asp:UpdateProgress ID="UpdateProgressUserDetails" runat="server" DisplayAfter="0">
<ProgressTemplate>
<div style="position: absolute; top: 384px; left: 169px;">
<img src="Main/images/Loader.gif" alt="loading" /><br />
<span style="font-weight: normal; font-size: small; color: #000000;">Please wait...</span>
</div>
</ProgressTemplate>
</asp:UpdateProgress>

</ContentTemplate>
</asp:CreateUserWizardStep>
<asp:CompleteWizardStep ID="CompleteWizardStep1" runat="server">
</asp:CompleteWizardStep>
</WizardSteps>
</asp:CreateUserWizard>
</ContentTemplate>
</asp:UpdatePanel>

Now I would like to know in which event and how do I display label "confirmmsg" after user account created from codebehind.


Solution

  • I found the answer:

    This is what I need to do in the CreatedUser event:

    Dim lbl As Label
    lbl = CreateUserWizard1.CompleteStep.ContentTemplateContainer.FindControl("confirmmsg")
    lbl.Text = "Some text"