C# '无过载;CreateUserWizard1_CreatedUser';匹配委托';System.EventHandler';
源错误:C# '无过载;CreateUserWizard1_CreatedUser';匹配委托';System.EventHandler';,c#,asp.net,.net,compiler-errors,C#,Asp.net,.net,Compiler Errors,源错误: Line 62: <asp:CreateUserWizard ID="CreateUserWizard1" // error appeared here Line 63: runat="server" Line 64: OnCreatedUser="CreateUserWizard1_CreatedUser" 代码如下: <asp:CreateUserWizard ID="CreateUserWiza
Line 62: <asp:CreateUserWizard ID="CreateUserWizard1" // error appeared here
Line 63: runat="server"
Line 64: OnCreatedUser="CreateUserWizard1_CreatedUser"
代码如下:
<asp:CreateUserWizard ID="CreateUserWizard1" //here is line 62
runat="server"
OnCreatedUser="CreateUserWizard1_CreatedUser"
InvalidPasswordErrorMessage="Password length must be more than 8 characters."
ContinueDestinationPageUrl="~/Home.aspx"
DisplayCancelButton = "True"
CancelDestinationPageUrl="~/Home.aspx"
DisableCreatedUser="True"
OnSendingMail="CreateUserWizard1_SendingMail"
>
您需要使用OnCreatingUser事件
<asp:CreateUserWizard ID="CreateUserWizard1" //here is line 62
runat="server"
OnCreatingUser="CreateUserWizard1_CreatedUser"
...
标记:
OnCreatingUser="CreateUserWizard1_CreatingUser"
OnCreatedUser="CreateUserWizard1_CreatedUser"
代码隐藏:
protected void CreateUserWizard1_CreatingUser(object sender, LoginCancelEventArgs e)
{
// Occurs before the membership provider is called to create the new Web site user account
}
protected void CreateUserWizard1_CreatedUser(object sender, EventArgs e)
{
// Occurs after the membership provider has created the new Web site user account
}
protected void CreateUserWizard1_CreatingUser(object sender, LoginCancelEventArgs e)
{
// Occurs before the membership provider is called to create the new Web site user account
}
protected void CreateUserWizard1_CreatedUser(object sender, EventArgs e)
{
// Occurs after the membership provider has created the new Web site user account
}