简体   繁体   English

自定义CreateUserWizardControl不起作用

[英]Customizing CreateUserWizardControl Not Working

Quite baffled and really frustrated as to what is preventing a customization to the CreateUserWizardControl from recognizing the additional controls. 对于阻止CreateUserWizardControl的自定义功能识别其他控件的原因, 确实感到困惑和沮丧。 I am using VS 2012 and created the project from a asp.net Web Forms 4.5 template. 我正在使用VS 2012,并从asp.net Web窗体4.5模板创建了项目。 It is working when testing with VS 2012 on my development Windows 7 machine . 在我的Windows 7开发计算机上使用VS 2012进行测试时,它可以正常工作。 When I deploy using the VS File Publish feature from VS with no file exclusions and then xcopy to my IIS 8 web server. 当我从VS使用VS File Publish功能进行部署时,没有文件排除,然后xcopy到我的IIS 8 Web服务器。 I checked the deployed Register.aspx page and the controls are there; 我检查了已部署的Register.aspx页面,并且控件在那里。 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>

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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