I have a .NET wizard with 14 steps total. On the first step, it asks a question that decides what step they will go to next. Basically, if they check one box, they go to the next step; if they check the other one; it skips the next step and sends them right on to the 3rd one.
I never have been really sure on how to determine the step index. Its not an option in properties. In the WizardStep Collection editor, there is a number next to each step, but i'm not sure if that's the Index, either.
Here's my code for the first step:
Protected Sub SetupWorksheet_NextButtonClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.WizardNavigationEventArgs) Handles SetupWorksheet.NextButtonClick
If SetupWorksheet.ActiveStepIndex = 0 Then
If rdoNoRec.Checked Then
'Send them directly to the Practice information step
SetupWorksheet.ActiveStepIndex = 2
SetupWorksheet.ActiveStepIndex = 1
This works great. I've tried it both ways, and it sends me to the correct step.
HOWEVER, i have 8 steps that are optional. That is, they fill out the first of the 8, and they can either go on to the next step (add another item) or they can go directly to finish. In order to do this, they check a box that says "if you are done, check this box" (something like that).
Here's the code I am trying to use here:
Protected Sub chkfinishA_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles chkfinishA.CheckedChanged
If chkfinishA.Checked = True Then
SetupWorksheet.ActiveStepIndex = 11
The problem here is that if I tell it to go to ActiveStepIndex 11, it brings you to the step DIRECTLY BEFORE the one I want (the step where i have "Review what you have entered").
So, naturally, I figured the Index of my review step MUST be 12. Nope... When I use 12, it brings you to the step DIRECTLY AFTER the my Review step..
I'm basically stumped here. Its like I'm working with a "phantom" WizardStep!!!!!!!!! Is there an 11.5??? haha!
Thanks for any help Experts!