WizardStepBase::ID Property
Gets or sets the programmatic identifier assigned to the server control.
Assembly: System.Web (in System.Web.dll)
public: property String^ ID { virtual String^ get() override; virtual void set(String^ value) override; }
| Exception | Condition |
|---|---|
| ArgumentException |
Use the ID property to identify and reference a particular wizard step control in a Web Forms page. The ID value becomes the name of the control instance in the page; this allows you to easily access a particular step in code for that page. For example, if you set the ID property of a WizardStepBase control to "Step1", you can reference the child controls of the wizard step in code for that page as Step1.Controls.
The WizardStepBase control ensures that each step in a Wizard control has a valid unique identifier when steps are added or modified at design time. For example, when you set the ID for a step at design time, it cannot match the identifier for another step contained in the Wizard control, and it cannot match the ID for the containing Wizard control.
The following code example defines three wizard steps for a Wizard control in a Web Forms page. In code for the page, the wizard step instances are named by their ID values, and they can be referenced in the code as WizardStep1, WizardStep2, and WizardStep3.
Available since 2.0