Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6046215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:12:47+00:00 2026-05-23T07:12:47+00:00

I have a custom CreateUserWizard in which the user gives his email as username.

  • 0

I have a custom CreateUserWizard in which the user gives his email as username. This code will not fire CompleteWizardStep1. I get my success message but the membership template is still active and continue only tries to create another user.

<fieldset>
        <legend>Create a User Account</legend>
        <asp:CreateUserWizard ID="CreateUserWizard1" runat="server" AutoGeneratePassword="False" 
             BackColor="#F7F6F3" BorderColor="#E6E2D8" BorderStyle="Solid" BorderWidth="1px" 
            CancelDestinationPageUrl="~/" ContinueDestinationPageUrl="~/CustomerDetails.aspx" 
            CreateUserButtonText="Continue" Font-Names="Verdana" Font-Size="0.8em" 
            OnCreatingUser="CreateUserWizard1_CreatingUser">
            <SideBarStyle BackColor="#5D7B9D" BorderWidth="0px" Font-Size="0.9em" 
                VerticalAlign="Top" />
            <SideBarButtonStyle BorderWidth="0px" Font-Names="Verdana" ForeColor="White" />
            <ContinueButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC" 
                BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" 
                ForeColor="#284775" />
            <NavigationButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC" 
                BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" 
                ForeColor="#284775" />
            <HeaderStyle BackColor="#5D7B9D" BorderStyle="Solid" Font-Bold="True" 
                Font-Size="0.9em" ForeColor="White" HorizontalAlign="Center" />
            <CreateUserButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC" 
                BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" 
                ForeColor="#284775" />
            <TitleTextStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <StepStyle BorderWidth="0px" />
            <WizardSteps>
                <asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server" >
                   <ContentTemplate>
                        <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">Email Address:</asp:Label><br />
                            <asp:TextBox ID="UserName" runat="server" MaxLength="32"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName" EnableClientScript="true"
                            ErrorMessage="Email address is required." ToolTip="Email address is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                            <asp:RegularExpressionValidator ID="regEmail" ControlToValidate="UserName" Text="Invalid e-mail" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" Runat="server" /><br />                
                        <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label><br />
                            <asp:TextBox ID="Password" runat="server" TextMode="Password" 
                            MaxLength="16"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password" EnableClientScript="true"
                            ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator><br />
                        <asp:Label ID="ConfirmPasswordLabel" runat="server" AssociatedControlID="ConfirmPassword">Confirm Password:</asp:Label><br />
                            <asp:TextBox ID="ConfirmPassword" runat="server" TextMode="Password" 
                            MaxLength="16"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="ConfirmPasswordRequired" runat="server" ControlToValidate="ConfirmPassword" EnableClientScript="true"
                            ErrorMessage="Confirm Password is required." ToolTip="Confirm Password is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator><br />
                            <asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="Password"
                            ControlToValidate="ConfirmPassword" Display="Dynamic" ErrorMessage="The Password and Confirmation Password must match."
                            ValidationGroup="CreateUserWizard1"></asp:CompareValidator>
                        <asp:TextBox ID="Email" runat="server" Visible="false" MaxLength="1"></asp:TextBox>
                    </ContentTemplate>
                </asp:CreateUserWizardStep>
                <asp:CompleteWizardStep ID="CompleteWizardStep1" runat="server" >
                </asp:CompleteWizardStep>
            </WizardSteps>
        </asp:CreateUserWizard>
        <p align="center">      
            <asp:Label ID="ActionStatus" runat="server" CssClass="Important"></asp:Label> 
        </p>
    </fieldset>

 protected void CreateUserWizard1_CreatingUser(object sender, LoginCancelEventArgs e)
{
        Page.Validate("CreateUserWizard1");
        if (!Page.IsValid)
        {
            return;
        }
        CreateUserWizard cuw = (CreateUserWizard)sender;
        cuw.Email = cuw.UserName;

        // Make sure that the user doesn't already belong to this role      
        if (Roles.IsUserInRole(cuw.UserName, "Customers"))
        {
            ActionStatus.Text = string.Format("User {0} already is a member.", cuw.UserName);
            return;
        }

        Roles.AddUserToRole(cuw.UserName, "Customers");

        // Display a status message      
        ActionStatus.Text = string.Format("User {0} was added.", cuw.UserName);
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T07:12:48+00:00Added an answer on May 23, 2026 at 7:12 am

    I am glad that nobody wasted their time trying to work their way through my code.

    Turns out that it was requiresUniqueEmail=”false” that needed to be present in my AspNetSqlMembershipProvider. It was set to “true” and the code never got past it.

    Thanks for visiting and cheers for your intentions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hi i would like to create a custom calendar, this calendar will have custom
I have custom js/jquery code which is running fine on all browsers including IE9
I have custom javascript code for tabs which works fine, but Im trying to
I have custom UIViewController which looks like this. @implementation UIViewControllerCustom - (id)init { self
I have custom view in my application which can be scrolled by the user.
I have custom code inside of a SSRS report that needs to get the
I have custom exceptions in my django project that look like this: class CustomFooError(Exception):
I have custom cell which contains number of rows in it.i want to write
I have custom assembly that is loaded on runtime. at this point i have
I have custom coded layout to hold all the childs. Here is the code:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.