locked
ConfirmActivation of CreateUserWizard won't come up RRS feed

  • Question

  • User1769015664 posted

    I am using the following code to create user using CreateUserWizard. When I click OK, it processes the request and create an entry in the database but the ConfirmActivation page does not come up that supposed to display a successful message.

    <body>
        <form id="form1" runat="server">
        <div>
          <asp:createuserwizard id="CreateUserWizard1" onnextbuttonclick="CreateUserWizard1_NextButtonClick" 
              runat="server" BorderStyle="Inset" Width="681px" 
              OnCreatingUser="CreateUserWizard1_CreatingUser" Height="336px" 
              BackColor="#B3B3FF" StartNextButtonStyle-Width ="125" StartNextButtonText="Submit" 
              HeaderText="New Account Verification" BorderColor="#336699">
    
    
            <HeaderStyle BackColor="#5D7B9D" BorderStyle="Solid" Font-Bold="True" Font-Size="0.9em"
                    ForeColor="White" HorizontalAlign="Center" />
    
                <ContinueButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC" BorderStyle="Solid"
                    BorderWidth="1px" Font-Names="Verdana" ForeColor="#284775" />
                <CreateUserButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC" BorderStyle="Solid"
                    BorderWidth="1px" Font-Names="Verdana" ForeColor="#284775" />
                <TitleTextStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
    
            <wizardsteps>
    
                <asp:wizardstep runat="server" steptype="Start" title="Identification">
                    &nbsp; Please verify your information <br /> 
                    <br />
                    <br />
                  <table class="auto-style16">
                    <tr>
                      <td class="auto-style15">
                          Entity ID:</td>
                      <td>
    <%--                    <asp:textbox id="txtEntityID" runat="server" onBlurr ="CallCodeBehind" --%>
                         <asp:textbox id="txtEntityID" runat="server"  
                               Width="177px" CssClass="auto-style4" MaxLength="6"  /></td>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtEntityID" ForeColor = "Red"
                                ValidationExpression="[a-zA-Z0-9]*$" ErrorMessage="*Entity ID must be numeric." />
                    </tr>
                    <tr>
                      <td class="auto-style15">
                          Last 4 of SSN:</td>
                      <td>
                        <asp:textbox id="txtSSN" runat="server" Width="177px" MaxLength="4" /></td>
                    </tr>
                    <tr>
                      <td class="auto-style15">
                          First Name:</td>
                      <td>
                        <asp:textbox id="txtFirstName" runat="server" Width="177px" MaxLength="25" /></td>
                    </tr>
                    <tr>
                      <td class="auto-style15">
                          Last Name:</td>
                      <td>
                        <asp:textbox id="txtLastName" runat="server" Width="177px" MaxLength="25" /></td>
                    </tr>
    <%--                  <tr><td class="auto-style8"><asp:Label ID="SearchAccountMessage" runat="server" ForeColor="red" /></td></tr>--%>
                  </table>
                    <table class="auto-style14">
                      <tr><td class="auto-style8"><asp:Label ID="SearchAccountMessage" runat="server" ForeColor="red" /></td></tr>
                    </table>
                </asp:wizardstep>
    
              <asp:createuserwizardstep  runat="server" title="Sign Up for Your New Account">                           
              <contenttemplate>
                  <table border="0">
                       <tr>
    <%--                      <td align="left" class="auto-style13" style="background-color: #CCCCCC; color: #0000FF;">--%>
                              <td align="left" class="auto-style13" style="background-color:; color: black;">
                                Sign Up for Your New Account<br /> <br />
                          </td>
                      </tr>
                    <tr>
                      <td class="auto-style13">
                        <table border="0" class="auto-style1">
    <%--                      <tr>
                            <td align="center" colspan="2" style="background-color: #CCCCCC; color: #0000FF;">
                              Sign Up for Your New Account<br /> <br /> </td>
                          </tr>--%>
                          <tr>
                            <td align="right">
                                Entity ID:</td>
                            <td>
                              <asp:textbox runat="server" id="UserName" MaxLength="9"></asp:textbox>
                              <asp:requiredfieldvalidator runat="server" controltovalidate="UserName" tooltip="User Name is required."
                                id="UserNameRequired" validationgroup="Createuserwizard1" errormessage="User Name is required.">
                                *</asp:requiredfieldvalidator>
    
                            </td>
                          </tr>
     
                           <tr>
                            <td align="right">
                              <asp:label runat="server" associatedcontrolid="Question" id="QuestionLabel">
                                First Name:</asp:label></td>
                            <td>
                              <asp:textbox runat="server" id="Question"></asp:textbox>
                              <asp:requiredfieldvalidator runat="server" controltovalidate="Question" tooltip="Security question is required."
                                id="QuestionRequired" validationgroup="Createuserwizard1" errormessage="Security question is required.">
                                *</asp:requiredfieldvalidator>
                            </td>
                          </tr>
                          <tr>
                            <td align="right">
                              <asp:label runat="server" associatedcontrolid="Answer" id="AnswerLabel">
                                Last Name:</asp:label></td>
                            <td>
                              <asp:textbox runat="server" id="Answer"></asp:textbox>
                              <asp:requiredfieldvalidator runat="server" controltovalidate="Answer" tooltip="Security answer is required."
                                id="AnswerRequired" validationgroup="Createuserwizard1" errormessage="Security answer is required.">
                                *</asp:requiredfieldvalidator>
                            </td>
                          </tr>
    
                          <tr>
                            <td align="right">
                              <asp:label runat="server" associatedcontrolid="SSN" id="Label1">
                                last 4 of SSN:</asp:label></td>
                            <td>
                              <asp:textbox runat="server" id="SSN"></asp:textbox>
                            </td>
                          </tr>
                           
                          <tr>
                            <td align="right">
                              <asp:label runat="server" associatedcontrolid="Email" id="EmailLabel">
                                Email:</asp:label></td>
                            <td>
                              <asp:textbox runat="server" id="Email" Width="206px"></asp:textbox>
                              <asp:requiredfieldvalidator runat="server" controltovalidate="Email" tooltip="Email is required."
                                id="EmailRequired" validationgroup="Createuserwizard1" errormessage="Email is required.">
                                *</asp:requiredfieldvalidator>
                              <asp:RegularExpressionValidator ID="regexEmailValid" runat="server" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ControlToValidate="Email" ErrorMessage="Invalid Email Format"></asp:RegularExpressionValidator>
    
                            </td>
                          </tr>
                            
                          <tr>
                            <td align="right">
                              <asp:label runat="server" associatedcontrolid="Password" id="PasswordLabel">
                                Password:</asp:label></td>
                            <td>
                              <asp:textbox runat="server" textmode="Password" id="Password"></asp:textbox>
                              <asp:requiredfieldvalidator runat="server" controltovalidate="Password" tooltip="Password is required."
                                id="PasswordRequired" validationgroup="Createuserwizard1" errormessage="Password is required.">
                                *</asp:requiredfieldvalidator>
                            </td>
                          </tr>
                          <tr>
                            <td align="right">
                              <asp:label runat="server" associatedcontrolid="ConfirmPassword" id="ConfirmPasswordLabel">
                                Confirm Password:</asp:label></td>
                            <td>
                              <asp:textbox runat="server" textmode="Password" id="ConfirmPassword"></asp:textbox>
                              <asp:requiredfieldvalidator runat="server" controltovalidate="ConfirmPassword" tooltip="Confirm Password is required."
                                id="ConfirmPasswordRequired" validationgroup="Createuserwizard1" errormessage="Confirm Password is required.">
                                *</asp:requiredfieldvalidator>
                            </td>
                          </tr>
    
                          <tr>
                            <td align="center" colspan="2">
                                <br />
                              <asp:comparevalidator runat="server" display="Dynamic" errormessage="The Password and Confirmation Password must match."
                                controltocompare="ConfirmPassword" controltovalidate="Password" id="PasswordCompare"
                                validationgroup="Createuserwizard1">
                              </asp:comparevalidator>
                            </td>
                          </tr>
                          <tr>
                            <td align="center" colspan="2" style="color: Red;">
                              <asp:literal runat="server" enableviewstate="False" id="FailureText">
                              </asp:literal>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </contenttemplate>
    
                  <CustomNavigationTemplate>
                      <table border="0" cellspacing="5" style="width:100%;height:100%;">
                          <tr align="right">
                              <td align="right" colspan="0">
                                  <asp:Button ID="Button1" Width="125" runat="server" BackColor="blue" ForeColor="White" BorderColor="#CCCCCC" 
                                      BorderStyle="Solid" BorderWidth="1px" CommandName="MovePrevious" Font-Names="Verdana" 
                                      Text="Previous" ValidationGroup="CreateUserWizard1" />
                              </td>
                               <td align="left" colspan="0">
                                  <asp:Button ID="StepNextButton" Width="125" runat="server" BackColor="blue" ForeColor="White" BorderColor="#CCCCCC" 
                                      BorderStyle="Solid" BorderWidth="1px" CommandName="MoveNext" Font-Names="Verdana" 
                                      Text="Create User" ValidationGroup="CreateUserWizard1" />
                              </td>
                         </tr>
                      </table>
                  </CustomNavigationTemplate>
    
              </asp:createuserwizardstep>
    
              <asp:completewizardstep runat="server" title="Complete">
                <contenttemplate>
                  <table border="0">
                    <tr>
                      <td>
                        <table border="0" style="height: 100%; width: 100%;">
                          <tr>
                            <td align="center" class="auto-style10">
                              Almost done!</td>
                          </tr<tr></tr>
                          <tr>
                            <td class="auto-style10">Your account has been successfully created.</td>
                          </tr>
                          <tr>
                              <td class="auto-style10">Please check your email and activate the account.</td>
                          </tr>
                          <tr>
                            <td align="right" class="auto-style10">
                              <asp:button runat="server" validationgroup="Createuserwizard1" commandname="Continue"
                                id="ContinueButton" causesvalidation="False" text="Continue" BackColor="#0033CC" ForeColor="White" />
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </contenttemplate>
              </asp:completewizardstep>
            </wizardsteps>
                <HeaderStyle BackColor="#5D7B9D" BorderStyle="Solid" Font-Bold="True" Font-Size="0.9em"
                    ForeColor="White" HorizontalAlign="Center" />
              <NavigationButtonStyle BackColor="LightSteelBlue" BorderColor="#CCCCCC" BorderStyle="Solid"
                    BorderWidth="1px" Font-Names="Verdana" ForeColor="#284775" />
                <StartNextButtonStyle BackColor="#0033CC" ForeColor="White" Width="125px" />
              <StepNextButtonStyle BackColor="red" Width="200" />
                <SideBarButtonStyle BorderWidth="0px" Font-Names="Verdana" ForeColor="White" /> 
    
    
              <SideBarStyle BackColor="#5D7B9D" BorderWidth="0px" Font-Size="0.9em" VerticalAlign="Top" />
                <StepStyle BorderWidth="0px" />
    
    
          </asp:createuserwizard>
        </div>
        </form>
    </body>
    

    Friday, May 22, 2020 6:07 AM

All replies

  • User-719153870 posted

    Hi NJ2,

    NJ2

    but the ConfirmActivation page does not come up that supposed to display a successful message.

    Seems the code is not complete, the create new user event should be in your CreateUserWizard1_CreatingUser event, redirect to ConfirmActivation page should be managed in this event.

    Please provide more back end code so that this issue can be reproduced and fixed.

    In addition, please also check Creating User Accounts (C#) for detailed tutorial.

    Best Regard,

    Yang Shen

    Friday, May 22, 2020 8:22 AM