简体   繁体   中英

Customizing CreateUserWizardControl Not Working

Quite baffled and really frustrated as to what is preventing a customization to the CreateUserWizardControl from recognizing the additional controls. I am using VS 2012 and created the project from a asp.net Web Forms 4.5 template. It is working when testing with VS 2012 on my development Windows 7 machine . When I deploy using the VS File Publish feature from VS with no file exclusions and then xcopy to my IIS 8 web server. I checked the deployed Register.aspx page and the controls are there; but, when I run the app the custom controls are not rendered to the page. I looked at the view source, they are not there at all. I have now simplified it down to just one checkbox and that is just not showing up. It does not matter if I put it on the page outside the wizard entirely or in the content template, the layout template, or the fieldset--nothing works.

Have I missed a setting or a step somewhere? My project is at a stand still for user testing and I am out of possibilities.

This is a code snippet:

<asp:CreateUserWizard runat="server" ID="RegisterUser" ViewStateMode="Disabled" 
        OnCreatedUser="RegisterUser_CreatedUser" 
        OnCreatingUser="RegisterUser_OnCreatingUser" 
        OnCreateUserError="RegisterUser_OnCreateUserError" 
         >
    <LayoutTemplate>
        <asp:PlaceHolder runat="server" ID="wizardStepPlaceholder" />
        <asp:PlaceHolder runat="server" ID="navigationPlaceholder" />
        <asp:HiddenField ID="hidLicenseNumber" runat="server" />
    </LayoutTemplate>
    <WizardSteps>
        <asp:CreateUserWizardStep runat="server" ID="RegisterUserWizardStep">
            <ContentTemplate>
                <p class="validation-summary-errors">
                    <asp:Literal runat="server" ID="ErrorMessage" />
                </p>
                <fieldset>
                    <legend>Registration Form</legend>
                    <ol>
                        .....
                        Bunch of list items here from the template for 
                         user name, question, and password 
                        .....
                        <li>
                            <asp:CheckBox ID="AgreeToTermsOfUse" runat="server" Text="Agree to Terms of Use"  />
                        </li>
                    </ol>
                    <asp:Button runat="server" CommandName="MoveNext" Text="Register" />
                </fieldset>
                 <p class="message-info">
                    Passwords are required to be a minimum of <%: Membership.MinRequiredPasswordLength %>characters in length. </p></ContentTemplate><CustomNavigationTemplate />
        </asp:CreateUserWizardStep>

通过创建一个全新的项目并提取减去向导页面的现有页面来解决此问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM