我在更新面板中有创建用户向导,以下是我的工作方式:
<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>
现在我想知道在代码隐藏创建用户帐户后,在哪个事件以及如何显示 label "confirmmsg"
。
答案 0 :(得分:1)
使用OnCreatedUser
“在成员资格提供程序创建新网站用户帐户后发生。”
代码示例
<asp:CreateUserWizard runat="server" OnCreatedUser="CreateUserWizard1_CreatedUser">
protected void CreateUserWizard1_CreatedUser(object sender, EventArgs e)
{
// Display the confirm msg
}
答案 1 :(得分:1)
我找到了答案:
这是我在CreatedUser事件中需要做的事情:
Dim lbl As Label
lbl = CreateUserWizard1.CompleteStep.ContentTemplateContainer.FindControl("confirmmsg")
lbl.Text = "Some text"