简体   繁体   English

asp.net向导控件奇怪的问题

[英]asp.net Wizard control strange issue

Update: 更新:

There was actually a hidden panel with validator in the user control that was causing page not to be valid on the first postback. 实际上,用户控件中有一个带有验证器的隐藏面板,这导致页面在第一次回发时无效。 Consider this issue resolved. 考虑此问题已解决。

This is first time I am using this control and it is behaving rather strange. 这是我第一次使用此控件,它的行为很奇怪。 I have to click on the "Next" button twice for it to move to the next step. 我必须单击“下一步”按钮两次,才能转到下一步。 I tried explicitly setting active index, using MoveTo etc. Nothing works. 我尝试使用MoveTo等显式设置活动索引。没有任何效果。 Here is the markup for the control. 这是控件的标记。 Anybody has any ideas why? 有人有什么想法吗?

 <asp:Wizard ID="UserWizard" runat="server" ActiveStepIndex="0"
         StartNextButtonImageUrl = "~/App_Themes/Default/images/buttons/continue.gif" StartNextButtonType="Image"
        StepNextButtonType="Image" StepNextButtonImageUrl="~/App_Themes/Default/images/buttons/continue.gif"
        FinishPreviousButtonImageUrl="~/App_Themes/Default/images/buttons/back.gif"
        FinishPreviousButtonType="Image" FinishCompleteButtonImageUrl="~/App_Themes/Default/images/buttons/save.gif"
        FinishCompleteButtonType="Image" CancelButtonType="Image" CancelButtonImageUrl="~/App_Themes/Default/images/buttons/back.gif"
        DisplaySideBar="false" >
        <WizardSteps>
            <asp:WizardStep Title="User Profile" ID="UserProfile" runat="server">
                <uhc:ctlUserProfileEdit ID="ctlUserProfileEdit" runat="server">
                </uhc:ctlUserProfileEdit>
                <br clear="all" />
                <div>
                    <asp:ImageButton ID="cmdResetPassword" runat="server" ImageUrl="~/App_Themes/Default/images/buttons/resetpassword.gif" />
                </div>
                <div>
                    <asp:UpdatePanel ID="upSchools" runat="server" ChildrenAsTriggers="true">
                        <ContentTemplate>
                            <uhc:ctlSchoolLocationSelector ID="ctlSchoolLocationSelector" runat="server" />
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </div>
            </asp:WizardStep>
            <asp:WizardStep Title="Roles" ID="Roles" runat="server">
                <uhc:ctlPermissionInternal ID="ctlPermissionInternal1" runat="server"></uhc:ctlPermissionInternal>
                <uhc:ctlPermissionExternal ID="ctlPermissionExternal1" runat="server"></uhc:ctlPermissionExternal>
            </asp:WizardStep>
        </WizardSteps>
    </asp:Wizard>

I don't know for sure if this is what's causing it, but I find it strange that there is an UpdatePanel within the Wizard control, rather than the Wizard Control within the update panel. 我不确定这是否是引起它的原因,但是我感到奇怪的是,向导控件中有一个UpdatePanel,而不是更新面板中的向导控件。 This may be causing some strange behavior. 这可能导致一些奇怪的行为。

Can you change this and see if the problem resolves itself? 您可以更改此设置,看看问题是否可以解决?

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

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