Hi,
I have a Wizard control from which I have to dynanically remove a few WizardSteps, depending on a startup parameter. I do this using code such as
wiz.WizardSteps.RemoveAt(4);
in Page_Load. It seems to work, until I try to navigate to the next step, when I get a server error:
Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls
added during a post-back must match the type and position of the controls added during the initial request.
Disabling viewstate for either the page or the Wizard control solves that problem, but breaks lots of other things. Most notably, all data is lost when the Previous button is clicked. Less obvious, but perhaps more serious, values from c ...
Go to the complete details ...