2

我在更新面板中有创建用户向导,这是我的做法:

<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"现在我想知道从代码隐藏创建用户帐户后在哪个事件中以及如何显示 。

4

2 回答 2

1

使用OnCreatedUser“在成员资格提供商创建新的网站用户帐户后发生。”

代码示例

<asp:CreateUserWizard runat="server" OnCreatedUser="CreateUserWizard1_CreatedUser">

  protected void CreateUserWizard1_CreatedUser(object sender, EventArgs e)
      {
         // Display the confirm msg

      }
于 2013-03-02T14:00:08.377 回答
1

我找到了答案:

这是我需要在 CreatedUser 事件中做的事情:

Dim lbl As Label
lbl = CreateUserWizard1.CompleteStep.ContentTemplateContainer.FindControl("confirmmsg")
lbl.Text = "Some text"
于 2013-03-02T14:20:30.137 回答