1

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

<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

谢谢。

4

1 回答 1

0

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

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

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

于 2014-02-27T10:34:04.603 回答