S
skardian
I have a created a wizard control that has a total of 21 steps. On the
first step the user can determine how many of the following 20 steps
they actually need. In a case in which the user needs only 4 steps the
code behind removes to other 16 steps that are no longer nessecary.
This all works and I can remove any number of steps and see the finish
button on the last needed step.
Here is my problem. If I tell the control that I only need 4 sub-steps,
I get a finish button on the 4th and final sub-step (as I had wanted).
However clicking the finish button yields me this error:
The command 'MoveComplete' is not valid for the previous step, make
sure the step type is not changed between postbacks.
Anyone have any ideas what is causing this? I am not changing the step
type, as they are all wizardsteps. However I am sure it has something
to do with the removing of the steps.
For additional clarification I am removing the steps using the
following code:
for (int i = createTaskWizard.WizardSteps.Count - 1; i >
Convert.ToInt32(txtNumberofSubs.Text); i--)
{
if (i > Convert.ToInt32(txtNumberofSubs.Text))
{
createTaskWizard.WizardSteps.Remove(createTaskWizard.WizardSteps);
}
}
I had to start at the last step and move forward in order to not have
an additional unwanted step.
first step the user can determine how many of the following 20 steps
they actually need. In a case in which the user needs only 4 steps the
code behind removes to other 16 steps that are no longer nessecary.
This all works and I can remove any number of steps and see the finish
button on the last needed step.
Here is my problem. If I tell the control that I only need 4 sub-steps,
I get a finish button on the 4th and final sub-step (as I had wanted).
However clicking the finish button yields me this error:
The command 'MoveComplete' is not valid for the previous step, make
sure the step type is not changed between postbacks.
Anyone have any ideas what is causing this? I am not changing the step
type, as they are all wizardsteps. However I am sure it has something
to do with the removing of the steps.
For additional clarification I am removing the steps using the
following code:
for (int i = createTaskWizard.WizardSteps.Count - 1; i >
Convert.ToInt32(txtNumberofSubs.Text); i--)
{
if (i > Convert.ToInt32(txtNumberofSubs.Text))
{
createTaskWizard.WizardSteps.Remove(createTaskWizard.WizardSteps);
}
}
I had to start at the last step and move forward in order to not have
an additional unwanted step.