[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Hide Show Step on Wizard Conteol

Posted on 2009-02-18
Medium Priority
Last Modified: 2012-05-06

I have a Wizard control and am having trouble hiding some steps depending on what was selected on the first step.

Basically There are 3 steps Step 1, Step 2, Step 3

On Step 1 there are 2 checkboxes ---  chkStep2  and chkStep3

If None of the checkboxes are selected then step 2 and 3 are hidden

If Only chkStep2 is checked and chkStep3 is not checked then only Step 2 is viisible and has a step type of "Finish"

If Only chkStep3 is checked and chkStep2 is not checked then only Step 3 is viisible and has a step type of "Finish"

If both are checked then both steps 3 and step 2 are visible

The "if"  statement is stright forward I am just not sure on what event on the wizard i need to put it on

Thanks for your help

Question by:patelajk

Accepted Solution

kumar_jac earned 375 total points
ID: 23668838
       don't try to hide.
based on the first step condition
navigate directly to the step what you want
using the

ActiveStepChanged event

Author Comment

ID: 23668952
Used this code but it doesnt hide corretly and i get this error on some occasions:

The command 'MoveComplete' is not valid for the previous step, make sure the step type is not changed between postbacks      

Step 1 = Details
Step 2 = Trial
Step 3 = NewsLetter
Private Sub Wizard1_NextButtonClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.WizardNavigationEventArgs) Handles wizSecSellerReg.NextButtonClick
		If wizSecSellerReg.ActiveStepIndex = 0 Then
			If chkNewletter.Checked = False And chkTrials.Checked = True Then
				wizSecSellerReg.ActiveStepIndex = 1
			End If
			If chkNewletter.Checked = True And chkTrials.Checked = False Then
				wizSecSellerReg.ActiveStepIndex = 2
			End If
			If chkNewletter.Checked = False And chkTrials.Checked = False Then
			End If
		End If
	End Sub

Open in new window


Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses
Course of the Month20 days, 7 hours left to enroll

868 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question