【问题标题】:Wizard Control Disable Buttons向导控制禁用按钮
【发布时间】:2013-07-31 09:11:22
【问题描述】:

如何在我的向导控件的“最后”步骤中禁用返回和确认按钮?

<asp:Wizard ID="Wizard" runat="server"  DisplayCancelButton="True"
StepPreviousButtonText="Back" FinishPreviousButtonText="Back"
FinishCompleteButtonText="Confirm" >

<WizardSteps>
.....
<asp:WizardStep ID="ConfirmStep" runat="server" Title="Confirm Request"
StepType="Finish" >
<asp:WizardStep>
....
</WizardSteps>
</asp:Wizard>



Protected Sub Wizard_FinishButtonClick(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.WizardNavigationEventArgs) Handles Wizard.FinishButtonClick
.......

'I want to disable the Confirm and Back button here after displaying the error message.
e.Cancel = True

End Sub

谢谢。

【问题讨论】:

标签: .net aspwizard


【解决方案1】:

选择您的向导并将其转换为 StartNavigationTempltae。然后在你的 aspx 页面中

<StartNavigationTemplate>
<asp:Button ID="StartNextButton" runat="server" CommandName="MoveNext" 
Text="Next" Visible="false" />
</StartNavigationTemplate>

将可见性设置为开始或您要隐藏的任何按钮

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-06
    • 2021-06-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多