我该如何告知用户新用户成功创建ASP.NET? [英] How can i inform ASP.NET that the a new User is created succesfully?

查看:98
本文介绍了我该如何告知用户新用户成功创建ASP.NET?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的网页我使用的组合的CreateUserWizard 和一个自定义验证模块。

In my webpage i use a combination of the CreateUserWizard and a custom validation module.

是幸运还是不幸的的CreateUserWizard 控制的看到的用户是不是成功创建并显示以下信息(尽管用户被成功地为加入记录,在我的MS-SQL数据库)。

Fortunately OR unfortunately the CreateUserWizard control sees that the user is not created succesfully and displays the following message (although the user is added succesfully as record, in my MS-SQL database).

您的帐户不被创建。请重试。

我该如何告知,用户将被转发到 ContinueDestinationPageUrl 的用户成功创建ASP.NET,所以不是上述消息的CreateUserWizard 控制?

How can i inform the ASP.NET that the user is created successfully, so instead of the the message mentioned above, the user will be forwarded to the ContinueDestinationPageUrl of the CreateUserWizard control?

推荐答案

使用 CreatedUser <一个href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.createuserwizard.createduser.aspx"相对=nofollow>事件。

标记:

<asp:CreateUserWizard runat="server" ID="wizardAddUser" OnCreatedUser="wizardAddUser_CreatedUser">
    ...
</asp:CreateUserWizard>

code-背后:

Code-behind:

protected void wizardAddUser_CreatedUser(object sender, EventArgs e)
{
    CreateUserWizard wizardAddUser = (CreateUserWizard)sender;
    Response.Redirect(String.Format("~/{0}?user={1}", "Default.aspx", wizardAddUser.UserName));
}

这篇关于我该如何告知用户新用户成功创建ASP.NET?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆