Wizard::MoveTo Method (WizardStepBase^)
Sets the specified WizardStepBase-derived object as the value for the ActiveStep property of the Wizard control.
Assembly: System.Web (in System.Web.dll)
Parameters
- wizardStep
-
Type:
System.Web.UI.WebControls::WizardStepBase^
The WizardStepBase-derived object to set as the ActiveStep.
| Exception | Condition |
|---|---|
| ArgumentNullException | The value of the WizardStepBase-derived object passed in is null. |
| ArgumentException | The ActiveStepIndex of the associated WizardStepBase-derived object passed in is equal to -1. |
Use the MoveTo method to control which WizardStepBase-derived object is set as the value for the ActiveStep property in the Wizard control programmatically. This way, you can change the ActiveStep property dynamically based on other conditions during run time.
The following code example demonstrates how to use the MoveTo method to control the ActiveStep property of the Wizard control. If the value of CheckBox1.Checked is true, the ActiveStep property is set to Wizard1.Step3; otherwise, the ActiveStep property is set to Wizard1.Step2.
Available since 2.0