WizardStepBase::ID Property
Gets or sets the programmatic identifier assigned to the server control.
Assembly: System.Web (in System.Web.dll)
| Exception | Condition |
|---|---|
| ArgumentException | The property was set to an invalid identifier string at design time. -or- The property was set to the same identifier as the containing Wizard control at design time. -or- The property was set to the same identifier as another step in the containing Wizard control at design time. |
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.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.