ASP.NET Syntax ASP.NET Syntax for Web Controls
Provides navigation and a user interface ( UI ) to collect related data across multiple steps.
Declarative Syntax
<asp:Wizard
AccessKey = "string"
ActiveStepIndex = integer
BackColor = "color name | #dddddd"
BorderColor = "color name | #dddddd"
BorderStyle = "NotSet | None | Dotted | Dashed | Solid | Double|Groove|
Ridge | Inset | Outset"
BorderWidth = size
CancelButtonImageUrl = "uri"
CancelButtonText = "string"
CancelButtonType = "Button | Image | Link"
CancelDestinationPageUrl = "uri"
CellPadding = integer
CellSpacing = integer
CssClass = "string"
DisplayCancelButton = "True | False"
DisplaySideBar = "True | False"
Enabled = "True | False"
EnableTheming = "True | False"
EnableViewState = "True | False"
FinishCompleteButtonImageUrl = "uri"
FinishCompleteButtonText = "string"
FinishCompleteButtonType = "Button | Image | Link"
FinishDestinationPageUrl = "uri"
FinishPreviousButtonImageUrl = "uri"
FinishPreviousButtonText = "string"
FinishPreviousButtonType = "Button | Image | Link"
Font-Bold = "True | False"
Font-Italic = "True | False"
Font-Names = "string"
Font-Overline = "True | False"
Font-Size = "string | Smaller | Larger | XX-Small | X-Small | Small |
Medium | Large | X-Large | XX-Large"
Font-Strikeout = "True | False"
Font-Underline = "True | False"
ForeColor = "color name | #dddddd"
HeaderText = "string"
Height = size
ID = "string"
OnActiveStepChanged = "ActiveStepChanged event handler"
OnCancelButtonClick = "CancelButtonClick event handler"
OnDataBinding = "DataBinding event handler"
OnDisposed = "Disposed event handler"
OnFinishButtonClick = "FinishButtonClick event handler"
OnInit = "Init event handler"
OnLoad = "Load event handler"
OnNextButtonClick = "NextButtonClick event handler"
OnPreRender = "PreRender event handler"
OnPreviousButtonClick = "PreviousButtonClick event handler"
OnSideBarButtonClick = "SideBarButtonClick event handler"
OnUnload = "Unload event handler"
runat = "server"
SkinID = "string"
SkipLinkText = "string"
StartNextButtonImageUrl = "uri"
StartNextButtonText = "string"
StartNextButtonType = "Button | Image | Link"
StepNextButtonImageUrl = "uri"
StepNextButtonText = "string"
StepNextButtonType = "Button | Image | Link"
StepPreviousButtonImageUrl = "uri"
StepPreviousButtonText = "string"
StepPreviousButtonType = "Button | Image | Link"
Style = "string"
TabIndex = integer
ToolTip = "string"
Visible = "True | False"
Width = size
>
<CancelButtonStyle />
<FinishCompleteButtonStyle />
<FinishNavigationTemplate>
<!-- child controls -->
</FinishNavigationTemplate>
<FinishPreviousButtonStyle />
<HeaderStyle />
<HeaderTemplate>
<!-- child controls -->
</HeaderTemplate>
<NavigationButtonStyle />
<NavigationStyle />
<SideBarButtonStyle />
<SideBarStyle />
<SideBarTemplate>
<!-- child controls -->
</SideBarTemplate>
<StartNavigationTemplate>
<!-- child controls -->
</StartNavigationTemplate>
<StartNextButtonStyle />
<StepNavigationTemplate>
<!-- child controls -->
</StepNavigationTemplate>
<StepNextButtonStyle />
<StepPreviousButtonStyle />
<StepStyle />
<WizardSteps>
<asp:TemplatedWizardStep
AllowReturn = "True | False"
ContentTemplateContainer = "string"
EnableTheming = "True | False"
EnableViewState = "True | False"
ID = "string"
OnActivate = "Activate event handler"
OnDataBinding = "DataBinding event handler"
OnDeactivate = "Deactivate event handler"
OnDisposed = "Disposed event handler"
OnInit = "Init event handler"
OnLoad = "Load event handler"
OnPreRender = "PreRender event handler"
OnUnload = "Unload event handler"
runat = "server"
SkinID = "string"
StepType = "Auto | Complete | Finish | Start | Step"
Title = "string"
Visible = "True | False"
>
<ContentTemplate>
<!-- child controls -->
</ContentTemplate>
<CustomNavigationTemplate>
<!-- child controls -->
</CustomNavigationTemplate>
</asp:TemplatedWizardStep>
<asp:WizardStep
AllowReturn = "True | False"
EnableTheming = "True | False"
EnableViewState = "True | False"
ID = "string"
OnActivate = "Activate event handler"
OnDataBinding = "DataBinding event handler"
OnDeactivate = "Deactivate event handler"
OnDisposed = "Disposed event handler"
OnInit = "Init event handler"
OnLoad = "Load event handler"
OnPreRender = "PreRender event handler"
OnUnload = "Unload event handler"
runat = "server"
SkinID = "string"
StepType = "Auto | Complete | Finish | Start | Step"
Title = "string"
Visible = "True | False"
/>
</WizardSteps>
</asp:Wizard>
For information on the individual members of this class, see Wizard in the class library.
The Wizard control is meant for:
- Collecting related data across multiple steps.
- Breaking up a larger Web page that is used to collect user input into smaller logical steps.
- Allowing 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 contains 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 that is 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.
The following example demonstrates how to define a Wizard control declaratively. The wizard has two steps and the StartNavigationTemplate and FinishNavigationTemplate property templates are defined.
<asp:wizard id="Wizard1" runat="server" activestepindex = "1">
<wizardsteps>
<asp:wizardstep id="WizardStep1" runat="server" title = "Step 1" />
<asp:wizardstep id="WizardStep2" runat="server" title = "Step 2" />
</wizardsteps>
<startnavigationtemplate>
<asp:button id="StartNextButton" runat="server" commandname = "MoveNext" text = "Next" />
</startnavigationtemplate>
<finishnavigationtemplate>
<asp:button id="FinishPreviousButton" runat="server"
causesvalidation = "False" commandname = "MovePrevious"
text = "Previous" />
<asp:button id="FinishButton" runat="server"
commandname = "MoveComplete"
text = "Finish" />
</finishnavigationtemplate>
</asp:wizard>
Wizard Class Wizard Web Server Control