System.Web.UI.WebControls Namespace
.NET Framework version 2.0
Provides navigation and a user interface ( UI ) to collect related data across multiple steps.
Visibility |
Constructor |
Parameters |
public |
Wizard |
( )
|
Visibility |
Name |
Value Type |
Accessibility |
public |
ActiveStep
|
WizardStepBase |
[ Get ] |
public |
ActiveStepIndex
|
Int32 |
[ Get , Set ] |
public |
CancelButtonImageUrl
|
String |
[ Get , Set ] |
public |
CancelButtonStyle
|
Style |
[ Get ] |
public |
CancelButtonText
|
String |
[ Get , Set ] |
public |
CancelButtonType
|
ButtonType |
[ Get , Set ] |
public |
CancelDestinationPageUrl
|
String |
[ Get , Set ] |
public |
CellPadding
|
Int32 |
[ Get , Set ] |
public |
CellSpacing
|
Int32 |
[ Get , Set ] |
public |
DisplayCancelButton
|
Boolean |
[ Get , Set ] |
public |
DisplaySideBar
|
Boolean |
[ Get , Set ] |
public |
FinishCompleteButtonImageUrl
|
String |
[ Get , Set ] |
public |
FinishCompleteButtonStyle
|
Style |
[ Get ] |
public |
FinishCompleteButtonText
|
String |
[ Get , Set ] |
public |
FinishCompleteButtonType
|
ButtonType |
[ Get , Set ] |
public |
FinishDestinationPageUrl
|
String |
[ Get , Set ] |
public |
FinishNavigationTemplate
|
ITemplate |
[ Get , Set ] |
public |
FinishPreviousButtonImageUrl
|
String |
[ Get , Set ] |
public |
FinishPreviousButtonStyle
|
Style |
[ Get ] |
public |
FinishPreviousButtonText
|
String |
[ Get , Set ] |
public |
FinishPreviousButtonType
|
ButtonType |
[ Get , Set ] |
public |
HeaderStyle
|
TableItemStyle |
[ Get ] |
public |
HeaderTemplate
|
ITemplate |
[ Get , Set ] |
public |
HeaderText
|
String |
[ Get , Set ] |
public |
LayoutTemplate
|
ITemplate |
[ Get , Set ] |
public |
NavigationButtonStyle
|
Style |
[ Get ] |
public |
NavigationStyle
|
TableItemStyle |
[ Get ] |
public |
SideBarButtonStyle
|
Style |
[ Get ] |
public |
SideBarStyle
|
TableItemStyle |
[ Get ] |
public |
SideBarTemplate
|
ITemplate |
[ Get , Set ] |
public |
SkipLinkText
|
String |
[ Get , Set ] |
public |
StartNavigationTemplate
|
ITemplate |
[ Get , Set ] |
public |
StartNextButtonImageUrl
|
String |
[ Get , Set ] |
public |
StartNextButtonStyle
|
Style |
[ Get ] |
public |
StartNextButtonText
|
String |
[ Get , Set ] |
public |
StartNextButtonType
|
ButtonType |
[ Get , Set ] |
public |
StepNavigationTemplate
|
ITemplate |
[ Get , Set ] |
public |
StepNextButtonImageUrl
|
String |
[ Get , Set ] |
public |
StepNextButtonStyle
|
Style |
[ Get ] |
public |
StepNextButtonText
|
String |
[ Get , Set ] |
public |
StepNextButtonType
|
ButtonType |
[ Get , Set ] |
public |
StepPreviousButtonImageUrl
|
String |
[ Get , Set ] |
public |
StepPreviousButtonStyle
|
Style |
[ Get ] |
public |
StepPreviousButtonText
|
String |
[ Get , Set ] |
public |
StepPreviousButtonType
|
ButtonType |
[ Get , Set ] |
public |
StepStyle
|
TableItemStyle |
[ Get ] |
public |
WizardSteps
|
WizardStepCollection |
[ Get ] |
|
You can use the Wizard control to:
- Collect related data across multiple steps.
- Break up a larger Web page used to collect user input into smaller logical steps.
- Allow for either linear or nonlinear navigation through the steps.
The Wizard control is made up of the following components:
- A WizardStepCollection collection of steps that contain the user interface for each step, as defined by the page developer.
- Built-in navigation capabilities that determine the appropriate buttons to display based on the StepType value.
- A header area that can be customized to display information specific to the step that the user is currently on.
- A sidebar area that can be used to quickly navigate to steps in the control.
Each of the steps in the Wizard control has a StepType property that determines the kind of navigation functionality that the step has. If you do not specify a value for the StepType property, the default value is Auto. The following table lists the available settings for the StepType property and the resulting behavior of the step.
StepType |
Description |
WizardStepType.Auto |
The navigation UI that is rendered for the step is determined by the order in which the step is declared. |
WizardStepType.Complete |
The step is the last one to appear. No navigation buttons are rendered. |
WizardStepType.Finish |
The step is the last one that collects user data. The Finish button is rendered for navigation. |
WizardStepType.Start |
The step is the first one to appear. A Previous button is not rendered. |
WizardStepType.Step |
The step is any step between the first and last. Previous and Next buttons are rendered for navigation. |
Using the Wizard control, data can be collected through linear or nonlinear navigation. Some examples of nonlinear navigation are skipping unnecessary steps or returning to a previously completed step to change some value. The Wizard control maintains its state between steps, so the data entered on a step does not need to be persisted to a data store until all the steps of the Wizard control have been completed.
Alternatively, if you want to persist the collected data to a data store as each step is completed, such as when the NextButtonClick event is raised, you should set the AllowReturn property of the WizardStepBase object to false so that the user cannot return to a previously completed step and change the data once it has been submitted.
You can use the MoveTo method or the ActiveStepIndex property to dynamically change the step that is currently displayed in the Wizard control.
The appearance of the Wizard control is fully customizable through templates, skins, and style settings. For example, you can use the HeaderTemplate, SideBarTemplate, StartNavigationTemplate, FinishNavigationTemplate, and StepNavigationTemplate properties to customize the interface of the Wizard control.
NOTE: Setting the FinishNavigationTemplate, DisplaySideBar, HeaderTemplate, SideBarTemplate, StartNavigationTemplate, or StepNavigationTemplate property recreates the child controls of the Wizard control. As a result, the view state for the child controls is lost in the process. To avoid this situation, explicitly maintain the control state of the Wizard control's child controls explicitly, or avoid putting controls inside of templates.
Note that the Wizard control does not support special Microsoft Internet Explorer rendering for non-standard or quirks mode. To get the best Internet Explorer rendering using the Wizard control, use the XHTML doc type, which is added by default in Visual Web Developer and Visual Studio.
For examples illustrating use of this control, see the individual member types of this class. For syntax information, see Wizard in ASP.NET Syntax for Web Controls.
Wizard Web Server Control