Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/305.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# '无过载;CreateUserWizard1_CreatedUser';匹配委托';System.EventHandler';_C#_Asp.net_.net_Compiler Errors - Fatal编程技术网

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
}