以编程方式切换到 CreateUserWizard 控件中的 CompleteWizardStep
如何以编程方式切换到 asp:CreateUserWizard
控件中 OnCreatingUser
事件中的 asp:CompleteWizardStep
步骤?
ASP.NET Web 表单
<asp:CreateUserWizard ID="MyCreateUserWizard" runat="server" OnCreatingUser="MyCreateUserWizard_CreatingUser">
<WizardSteps>
<asp:CreateUserWizardStep ID="CreateUserStep1" runat="server">
<!-- code here -->
</asp:CreateUserWizardStep>
<asp:CompleteWizardStep ID="CompleteWizardStep" runat="server">
<!-- code here -->
</asp:CompleteWizardStep>
</WizardSteps>
</asp:CreatedWizardStep>
隐藏代码
protected void MyCreateUserWizard_CreatingUser(object sender, EventArgs e)
{
//retrieve username, password and email
Membership.CreateUser(username, password, email);
//would like to display the CompleteWizardStpe here
}
How do I programmatically switch to the asp:CompleteWizardStep
step in the OnCreatingUser
event in the asp:CreateUserWizard
control?
ASP.NET web form
<asp:CreateUserWizard ID="MyCreateUserWizard" runat="server" OnCreatingUser="MyCreateUserWizard_CreatingUser">
<WizardSteps>
<asp:CreateUserWizardStep ID="CreateUserStep1" runat="server">
<!-- code here -->
</asp:CreateUserWizardStep>
<asp:CompleteWizardStep ID="CompleteWizardStep" runat="server">
<!-- code here -->
</asp:CompleteWizardStep>
</WizardSteps>
</asp:CreatedWizardStep>
Code behind
protected void MyCreateUserWizard_CreatingUser(object sender, EventArgs e)
{
//retrieve username, password and email
Membership.CreateUser(username, password, email);
//would like to display the CompleteWizardStpe here
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我刚刚使用空的 OnCreatingUser 事件处理程序在 VS2008 / .net 3.5 中重新创建了您的解决方案,它“在我的计算机上运行”。那么,有什么不同可能导致这个问题呢?
aspx:
代码隐藏:
web.config:
其工作视频:http://www.screentoaster.com /watch/stWEJSR0ZIR19YRVleWV9QXlJX
I just recreated your solution in VS2008 / .net 3.5 using the empty OnCreatingUser event handler and it "works on my computer". So, what's different that could be causing this problem?
aspx:
Code-behind:
web.config:
Video of it working: http://www.screentoaster.com/watch/stWEJSR0ZIR19YRVleWV9QXlJX