Wizard Class
TOC
Collapse the table of content
Expand the table of content

Wizard Class

 

Provides navigation and a user interface (UI) to collect related data across multiple steps.

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

System.Object
  System.Web.UI.Control
    System.Web.UI.WebControls.WebControl
      System.Web.UI.WebControls.CompositeControl
        System.Web.UI.WebControls.Wizard
          System.Web.UI.WebControls.CreateUserWizard

[BindableAttribute(false)]
public class Wizard : CompositeControl

NameDescription
System_CAPS_pubmethodWizard()

Initializes a new instance of the Wizard class.

NameDescription
System_CAPS_pubpropertyAccessKey

Gets or sets the access key that allows you to quickly navigate to the Web server control.(Inherited from WebControl.)

System_CAPS_pubpropertyActiveStep

Gets the step in the WizardSteps collection that is currently displayed to the user.

System_CAPS_pubpropertyActiveStepIndex

Gets or sets the index of the current WizardStepBase object.

System_CAPS_protpropertyAdapter

Gets the browser-specific adapter for the control.(Inherited from Control.)

System_CAPS_pubpropertyAppRelativeTemplateSourceDirectory

Gets or sets the application-relative virtual directory of the Page or UserControl object that contains this control.(Inherited from Control.)

System_CAPS_pubpropertyAttributes

Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control.(Inherited from WebControl.)

System_CAPS_pubpropertyBackColor

Gets or sets the background color of the Web server control.(Inherited from WebControl.)

System_CAPS_pubpropertyBindingContainer

This API supports the product infrastructure and is not intended to be used directly from your code. Gets the control that contains this control's data binding.(Inherited from Control.)

System_CAPS_pubpropertyBorderColor

Gets or sets the border color of the Web control.(Inherited from WebControl.)

System_CAPS_pubpropertyBorderStyle

Gets or sets the border style of the Web server control.(Inherited from WebControl.)

System_CAPS_pubpropertyBorderWidth

Gets or sets the border width of the Web server control.(Inherited from WebControl.)

System_CAPS_pubpropertyCancelButtonImageUrl

Gets or sets the URL of the image displayed for the Cancel button.

System_CAPS_pubpropertyCancelButtonStyle

Gets a reference to a collection of style properties that define the appearance of the Cancel button.

System_CAPS_pubpropertyCancelButtonText

Gets or sets the text caption that is displayed for the Cancel button.

System_CAPS_pubpropertyCancelButtonType

Gets or sets the type of button that is rendered as the Cancel button.

System_CAPS_pubpropertyCancelDestinationPageUrl

Gets or sets the URL that the user is directed to when they click the Cancel button.

System_CAPS_pubpropertyCellPadding

Gets or sets the amount of space between the contents of the cell and the cell border.

System_CAPS_pubpropertyCellSpacing

Gets or sets the amount of space between cells.

System_CAPS_protpropertyChildControlsCreated

Gets a value that indicates whether the server control's child controls have been created.(Inherited from Control.)

System_CAPS_pubpropertyClientID

Gets the control ID for HTML markup that is generated by ASP.NET.(Inherited from Control.)

System_CAPS_pubpropertyClientIDMode

Gets or sets the algorithm that is used to generate the value of the ClientID property.(Inherited from Control.)

System_CAPS_protpropertyClientIDSeparator

Gets a character value representing the separator character used in the ClientID property.(Inherited from Control.)

System_CAPS_protpropertyContext

Gets the HttpContext object associated with the server control for the current Web request.(Inherited from Control.)

System_CAPS_pubpropertyControls

Gets a ControlCollection object that represents the child controls in a CompositeControl.(Inherited from CompositeControl.)

System_CAPS_pubpropertyControlStyle

Gets the style of the Web server control. This property is used primarily by control developers.(Inherited from WebControl.)

System_CAPS_pubpropertyControlStyleCreated

Gets a value indicating whether a Style object has been created for the ControlStyle property. This property is primarily used by control developers.(Inherited from WebControl.)

System_CAPS_pubpropertyCssClass

Gets or sets the Cascading Style Sheet (CSS) class rendered by the Web server control on the client.(Inherited from WebControl.)

System_CAPS_pubpropertyDataItemContainer

Gets a reference to the naming container if the naming container implements IDataItemContainer.(Inherited from Control.)

System_CAPS_pubpropertyDataKeysContainer

Gets a reference to the naming container if the naming container implements IDataKeysControl.(Inherited from Control.)

System_CAPS_protpropertyDesignMode

Gets a value indicating whether a control is being used on a design surface.(Inherited from Control.)

System_CAPS_pubpropertyDisplayCancelButton

Gets or sets a Boolean value indicating whether to display a Cancel button.

System_CAPS_pubpropertyDisplaySideBar

Gets or sets a Boolean value indicating whether to display the sidebar area on the Wizard control.

System_CAPS_pubpropertyEnabled

Gets or sets a value indicating whether the Web server control is enabled.(Inherited from WebControl.)

System_CAPS_pubpropertyEnableTheming

Gets or sets a value indicating whether themes apply to this control.(Inherited from WebControl.)

System_CAPS_pubpropertyEnableViewState

Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.(Inherited from Control.)

System_CAPS_protpropertyEvents

Gets a list of event handler delegates for the control. This property is read-only.(Inherited from Control.)

System_CAPS_pubpropertyFinishCompleteButtonImageUrl

Gets or sets the URL of the image that is displayed for the Finish button.

System_CAPS_pubpropertyFinishCompleteButtonStyle

Gets a reference to a Style object that defines the settings for the Finish button.

System_CAPS_pubpropertyFinishCompleteButtonText

Gets or sets the text caption that is displayed for the Finish button.

System_CAPS_pubpropertyFinishCompleteButtonType

Gets or sets the type of button that is rendered as the Finish button.

System_CAPS_pubpropertyFinishDestinationPageUrl

Gets or sets the URL that the user is redirected to when they click the Finish button.

System_CAPS_pubpropertyFinishNavigationTemplate

Gets or sets the template that is used to display the navigation area on the Finish step.

System_CAPS_pubpropertyFinishPreviousButtonImageUrl

Gets or sets the URL of the image that is displayed for the Previous button on the Finish step.

System_CAPS_pubpropertyFinishPreviousButtonStyle

Gets a reference to a Style object that defines the settings for the Previous button on the Finish step.

System_CAPS_pubpropertyFinishPreviousButtonText

Gets or sets the text caption that is displayed for the Previous button on the Finish step.

System_CAPS_pubpropertyFinishPreviousButtonType

Gets or sets the type of button that is rendered as the Previous button on the Finish step.

System_CAPS_pubpropertyFont

Gets the font properties associated with the Web server control.(Inherited from WebControl.)

System_CAPS_pubpropertyForeColor

Gets or sets the foreground color (typically the color of the text) of the Web server control.(Inherited from WebControl.)

System_CAPS_pubpropertyHasAttributes

Gets a value indicating whether the control has attributes set.(Inherited from WebControl.)

System_CAPS_protpropertyHasChildViewState

Gets a value indicating whether the current server control's child controls have any saved view-state settings.(Inherited from Control.)

System_CAPS_pubpropertyHeaderStyle

Gets a reference to a Style object that defines the settings for the header area on the control.

System_CAPS_pubpropertyHeaderTemplate

Gets or sets the template that is used to display the header area on the control.

System_CAPS_pubpropertyHeaderText

Gets or sets the text caption that is displayed for the header area on the control.

System_CAPS_pubpropertyHeight

Gets or sets the height of the Web server control.(Inherited from WebControl.)

System_CAPS_pubpropertyID

Gets or sets the programmatic identifier assigned to the server control.(Inherited from Control.)

System_CAPS_protpropertyIdSeparator

This API supports the product infrastructure and is not intended to be used directly from your code. Gets the character used to separate control identifiers.(Inherited from Control.)

System_CAPS_protpropertyIsChildControlStateCleared

Gets a value indicating whether controls contained within this control have control state.(Inherited from Control.)

System_CAPS_protpropertyIsEnabled

Gets a value indicating whether the control is enabled.(Inherited from WebControl.)

System_CAPS_protpropertyIsTrackingViewState

Gets a value that indicates whether the server control is saving changes to its view state.(Inherited from Control.)

System_CAPS_protpropertyIsViewStateEnabled

Gets a value indicating whether view state is enabled for this control.(Inherited from Control.)

System_CAPS_pubpropertyLayoutTemplate

Gets or sets the custom content of the root container in a Wizard control.

System_CAPS_protpropertyLoadViewStateByID

Gets a value indicating whether the control participates in loading its view state by ID instead of index. (Inherited from Control.)

System_CAPS_pubpropertyNamingContainer

Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same Control.ID property value.(Inherited from Control.)

System_CAPS_pubpropertyNavigationButtonStyle

Gets a reference to a Style object that defines the settings for the buttons in the navigation area on the control.

System_CAPS_pubpropertyNavigationStyle

Gets a reference to a Style object that defines the settings for the navigation area on the control.

System_CAPS_pubpropertyPage

Gets a reference to the Page instance that contains the server control.(Inherited from Control.)

System_CAPS_pubpropertyParent

Gets a reference to the server control's parent control in the page control hierarchy.(Inherited from Control.)

System_CAPS_pubpropertyRenderingCompatibility

Gets a value that specifies the ASP.NET version that rendered HTML will be compatible with.(Inherited from Control.)

System_CAPS_pubpropertySideBarButtonStyle

Gets a reference to a Style object that defines the settings for the buttons on the sidebar.

System_CAPS_pubpropertySideBarStyle

Gets a reference to a Style object that defines the settings for the sidebar area on the control.

System_CAPS_pubpropertySideBarTemplate

Gets or sets the template that is used to display the sidebar area on the control.

System_CAPS_pubpropertySite

Gets information about the container that hosts the current control when rendered on a design surface.(Inherited from Control.)

System_CAPS_pubpropertySkinID

Gets or sets the skin to apply to the control.(Inherited from WebControl.)

System_CAPS_pubpropertySkipLinkText

Gets or sets a value that is used to render alternate text that notifies screen readers to skip the content in the sidebar area.

System_CAPS_pubpropertyStartNavigationTemplate

Gets or sets the template that is used to display the navigation area on the Start step of the Wizard control.

System_CAPS_pubpropertyStartNextButtonImageUrl

Gets or sets the URL of the image that is displayed for the Next button on the Start step.

System_CAPS_pubpropertyStartNextButtonStyle

Gets a reference to a Style object that defines the settings for the Next button on the Start step.

System_CAPS_pubpropertyStartNextButtonText

Gets or sets the text caption that is displayed for the Next button on the Start step.

System_CAPS_pubpropertyStartNextButtonType

Gets or sets the type of button that is rendered as the Next button on the Start step.

System_CAPS_pubpropertyStepNavigationTemplate

Gets or sets the template that is used to display the navigation area on any WizardStepBase-derived objects other than the Start, the Finish, or Complete step.

System_CAPS_pubpropertyStepNextButtonImageUrl

Gets or sets the URL of the image that is displayed for the Next button.

System_CAPS_pubpropertyStepNextButtonStyle

Gets a reference to the Style object that defines the settings for the Next button.

System_CAPS_pubpropertyStepNextButtonText

Gets or sets the text caption that is displayed for the Next button.

System_CAPS_pubpropertyStepNextButtonType

Gets or sets the type of button that is rendered as the Next button.

System_CAPS_pubpropertyStepPreviousButtonImageUrl

Gets or sets the URL of the image that is displayed for the Previous button.

System_CAPS_pubpropertyStepPreviousButtonStyle

Gets a reference to a Style object that defines the settings for the Previous button.

System_CAPS_pubpropertyStepPreviousButtonText

Gets or sets the text caption that is displayed for the Previous button.

System_CAPS_pubpropertyStepPreviousButtonType

Gets or sets the type of button that is rendered as the Previous button.

System_CAPS_pubpropertyStepStyle

Gets a reference to a Style object that defines the settings for the WizardStep objects.

System_CAPS_pubpropertyStyle

Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control.(Inherited from WebControl.)

System_CAPS_pubpropertySupportsDisabledAttribute

Gets a value that indicates whether the control should set the disabled attribute of the rendered HTML element to "disabled" when the control's IsEnabled property is false.(Inherited from CompositeControl.)

System_CAPS_pubpropertyTabIndex

Gets or sets the tab index of the Web server control.(Inherited from WebControl.)

System_CAPS_protpropertyTagKey

Gets the HtmlTextWriterTag value that corresponds to the Wizard control.(Overrides WebControl.TagKey.)

System_CAPS_protpropertyTagName

Gets the name of the control tag. This property is used primarily by control developers.(Inherited from WebControl.)

System_CAPS_pubpropertyTemplateControl

Gets or sets a reference to the template that contains this control. (Inherited from Control.)

System_CAPS_pubpropertyTemplateSourceDirectory

Gets the virtual directory of the Page or UserControl that contains the current server control.(Inherited from Control.)

System_CAPS_pubpropertyToolTip

Gets or sets the text displayed when the mouse pointer hovers over the Web server control.(Inherited from WebControl.)

System_CAPS_pubpropertyUniqueID

Gets the unique, hierarchically qualified identifier for the server control.(Inherited from Control.)

System_CAPS_pubpropertyValidateRequestMode

Gets or sets a value that indicates whether the control checks client input from the browser for potentially dangerous values.(Inherited from Control.)

System_CAPS_protpropertyViewState

Gets a dictionary of state information that allows you to save and restore the view state of a server control across multiple requests for the same page.(Inherited from Control.)

System_CAPS_protpropertyViewStateIgnoresCase

Gets a value that indicates whether the StateBag object is case-insensitive.(Inherited from Control.)

System_CAPS_pubpropertyViewStateMode

Gets or sets the view-state mode of this control.(Inherited from Control.)

System_CAPS_pubpropertyVisible

Gets or sets a value that indicates whether a server control is rendered as UI on the page.(Inherited from Control.)

System_CAPS_pubpropertyWidth

Gets or sets the width of the Web server control.(Inherited from WebControl.)

System_CAPS_pubpropertyWizardSteps

Gets a collection containing all the WizardStepBase objects that are defined for the control.

NameDescription
System_CAPS_protmethodAddAttributesToRender(HtmlTextWriter)

Adds HTML attributes and styles that need to be rendered to the specified HtmlTextWriterTag. This method is used primarily by control developers.(Inherited from WebControl.)

System_CAPS_protmethodAddedControl(Control, Int32)

Called after a child control is added to the Controls collection of the Control object.(Inherited from Control.)

System_CAPS_protmethodAddParsedSubObject(Object)

Notifies the server control that an element, either XML or HTML, was parsed, and adds the element to the server control's ControlCollection object.(Inherited from Control.)

System_CAPS_protmethodAllowNavigationToStep(Int32)

Uses a Boolean value to determine whether the ActiveStep property can be set to the WizardStepBase object that corresponds to the index that is passed in.

System_CAPS_pubmethodApplyStyle(Style)

Copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers.(Inherited from WebControl.)

System_CAPS_pubmethodApplyStyleSheetSkin(Page)

Applies the style properties defined in the page style sheet to the control.(Inherited from Control.)

System_CAPS_protmethodBeginRenderTracing(TextWriter, Object)

Begins design-time tracing of rendering data.(Inherited from Control.)

System_CAPS_protmethodBuildProfileTree(String, Boolean)

This API supports the product infrastructure and is not intended to be used directly from your code. Gathers information about the server control and delivers it to the Trace property to be displayed when tracing is enabled for the page.(Inherited from Control.)

System_CAPS_protmethodClearCachedClientID()

This API supports the product infrastructure and is not intended to be used directly from your code. Sets the cached ClientID value to null.(Inherited from Control.)

System_CAPS_protmethodClearChildControlState()

Deletes the control-state information for the server control's child controls. (Inherited from Control.)

System_CAPS_protmethodClearChildState()

Deletes the view-state and control-state information for all the server control's child controls.(Inherited from Control.)

System_CAPS_protmethodClearChildViewState()

Deletes the view-state information for all the server control's child controls.(Inherited from Control.)

System_CAPS_protmethodClearEffectiveClientIDMode()

This API supports the product infrastructure and is not intended to be used directly from your code. Sets the ClientIDMode property of the current control instance and of any child controls to Inherit.(Inherited from Control.)

System_CAPS_pubmethodCopyBaseAttributes(WebControl)

Copies the properties not encapsulated by the Style object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers.(Inherited from WebControl.)

System_CAPS_protmethodCreateChildControls()

Creates child controls.(Overrides Control.CreateChildControls().)

System_CAPS_protmethodCreateControlCollection()

Creates control collection.(Overrides Control.CreateControlCollection().)

System_CAPS_protmethodCreateControlHierarchy()

Creates the hierarchy of child controls that make up the control.

System_CAPS_protmethodCreateControlStyle()

Creates control style.(Overrides WebControl.CreateControlStyle().)

System_CAPS_pubmethodDataBind()

Binds a data source to the CompositeControl and all its child controls.(Inherited from CompositeControl.)

System_CAPS_protmethodDataBind(Boolean)

Binds a data source to the invoked server control and all its child controls with an option to raise the DataBinding event. (Inherited from Control.)

System_CAPS_protmethodDataBindChildren()

Binds a data source to the server control's child controls.(Inherited from Control.)

System_CAPS_pubmethodDispose()

Enables a server control to perform final clean up before it is released from memory.(Inherited from Control.)

System_CAPS_protmethodEndRenderTracing(TextWriter, Object)

Ends design-time tracing of rendering data.(Inherited from Control.)

System_CAPS_protmethodEnsureChildControls()

Determines whether the server control contains child controls. If it does not, it creates child controls.(Inherited from Control.)

System_CAPS_protmethodEnsureID()

Creates an identifier for controls that do not have an identifier assigned.(Inherited from Control.)

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodFindControl(String)

Searches the current naming container for a server control with the specified id parameter.(Inherited from Control.)

System_CAPS_protmethodFindControl(String, Int32)

This API supports the product infrastructure and is not intended to be used directly from your code. Searches the current naming container for a server control with the specified id and an integer, specified in the pathOffset parameter, which aids in the search. You should not override this version of the FindControl method.(Inherited from Control.)

System_CAPS_pubmethodFocus()

Sets input focus to a control.(Inherited from Control.)

System_CAPS_protmethodGetDesignModeState()

Gets the design mode state.(Overrides Control.GetDesignModeState().)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetHistory()

Returns a collection of WizardStepBase objects that have been accessed.

System_CAPS_pubmethodGetRouteUrl(Object)

Gets the URL that corresponds to a set of route parameters.(Inherited from Control.)

System_CAPS_pubmethodGetRouteUrl(RouteValueDictionary)

Gets the URL that corresponds to a set of route parameters.(Inherited from Control.)

System_CAPS_pubmethodGetRouteUrl(String, Object)

Gets the URL that corresponds to a set of route parameters and a route name.(Inherited from Control.)

System_CAPS_pubmethodGetRouteUrl(String, RouteValueDictionary)

Gets the URL that corresponds to a set of route parameters and a route name.(Inherited from Control.)

System_CAPS_pubmethodGetStepType(WizardStepBase, Int32)

Returns the WizardStepType value for the specified WizardStepBase object.

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodGetUniqueIDRelativeTo(Control)

Returns the prefixed portion of the UniqueID property of the specified control.(Inherited from Control.)

System_CAPS_pubmethodHasControls()

Determines if the server control contains any child controls.(Inherited from Control.)

System_CAPS_protmethodHasEvents()

Returns a value indicating whether events are registered for the control or any child controls.(Inherited from Control.)

System_CAPS_protmethodIsLiteralContent()

This API supports the product infrastructure and is not intended to be used directly from your code. Determines if the server control holds only literal content.(Inherited from Control.)

System_CAPS_protmethodLoadControlState(Object)

Restores control state information.(Overrides Control.LoadControlState(Object).)

System_CAPS_protmethodLoadViewState(Object)

Loads view-state information.(Overrides WebControl.LoadViewState(Object).)

System_CAPS_protmethodMapPathSecure(String)

Retrieves the physical path that a virtual path, either absolute or relative, maps to.(Inherited from Control.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodMergeStyle(Style)

Copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers.(Inherited from WebControl.)

System_CAPS_pubmethodMoveTo(WizardStepBase)

Sets the specified WizardStepBase-derived object as the value for the ActiveStep property of the Wizard control.

System_CAPS_protmethodOnActiveStepChanged(Object, EventArgs)

Raises the ActiveStepChanged event.

System_CAPS_protmethodOnBubbleEvent(Object, EventArgs)

Determines whether the event for the server control is passed up the page’s user interface server control hierarchy.(Overrides Control.OnBubbleEvent(Object, EventArgs).)

System_CAPS_protmethodOnCancelButtonClick(EventArgs)

Raises the CancelButtonClick event.

System_CAPS_protmethodOnDataBinding(EventArgs)

Raises the DataBinding event.(Inherited from Control.)

System_CAPS_protmethodOnFinishButtonClick(WizardNavigationEventArgs)

Raises the FinishButtonClick event.

System_CAPS_protmethodOnInit(EventArgs)

Raises the Init event.(Overrides Control.OnInit(EventArgs).)

System_CAPS_protmethodOnLoad(EventArgs)

Raises the Load event.(Inherited from Control.)

System_CAPS_protmethodOnNextButtonClick(WizardNavigationEventArgs)

Raises the NextButtonClick event.

System_CAPS_protmethodOnPreRender(EventArgs)

Raises the PreRender event.(Inherited from Control.)

System_CAPS_protmethodOnPreviousButtonClick(WizardNavigationEventArgs)

Raises the PreviousButtonClick event.

System_CAPS_protmethodOnSideBarButtonClick(WizardNavigationEventArgs)

Raises the SideBarButtonClick event.

System_CAPS_protmethodOnUnload(EventArgs)

Raises the Unload event.(Inherited from Control.)

System_CAPS_protmethodOpenFile(String)

Gets a Stream used to read a file.(Inherited from Control.)

System_CAPS_protmethodRaiseBubbleEvent(Object, EventArgs)

Assigns any sources of the event and its information to the control's parent.(Inherited from Control.)

System_CAPS_protmethodRecreateChildControls()

Recreates the child controls in a control derived from CompositeControl. (Inherited from CompositeControl.)

System_CAPS_protmethodRegisterCommandEvents(IButtonControl)

Registers a new instance of the CommandEventHandler class for the specified IButtonControl object.

System_CAPS_protmethodRemovedControl(Control)

Called after a child control is removed from the Controls collection of the Control object.(Inherited from Control.)

System_CAPS_protmethodRender(HtmlTextWriter)

Renders the control to the specified writer.(Overrides CompositeControl.Render(HtmlTextWriter).)

System_CAPS_pubmethodRenderBeginTag(HtmlTextWriter)

Renders the HTML opening tag of the control to the specified writer. This method is used primarily by control developers.(Inherited from WebControl.)

System_CAPS_protmethodRenderChildren(HtmlTextWriter)

Outputs the content of a server control's children to a provided HtmlTextWriter object, which writes the content to be rendered on the client.(Inherited from Control.)

System_CAPS_protmethodRenderContents(HtmlTextWriter)

Renders the contents of the control to the specified writer. This method is used primarily by control developers.(Inherited from WebControl.)

System_CAPS_pubmethodRenderControl(HtmlTextWriter)

Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled.(Inherited from Control.)

System_CAPS_protmethodRenderControl(HtmlTextWriter, ControlAdapter)

Outputs server control content to a provided HtmlTextWriter object using a provided ControlAdapter object.(Inherited from Control.)

System_CAPS_pubmethodRenderEndTag(HtmlTextWriter)

Renders the HTML closing tag of the control into the specified writer. This method is used primarily by control developers.(Inherited from WebControl.)

System_CAPS_protmethodResolveAdapter()

Gets the control adapter responsible for rendering the specified control.(Inherited from Control.)

System_CAPS_pubmethodResolveClientUrl(String)

Gets a URL that can be used by the browser.(Inherited from Control.)

System_CAPS_pubmethodResolveUrl(String)

Converts a URL into one that is usable on the requesting client.(Inherited from Control.)

System_CAPS_protmethodSaveControlState()

Save the control state.(Overrides Control.SaveControlState().)

System_CAPS_protmethodSaveViewState()

Saves the view state.(Overrides WebControl.SaveViewState().)

System_CAPS_protmethodSetDesignModeState(IDictionary)

Sets design-time data for a control.(Inherited from Control.)

System_CAPS_pubmethodSetRenderMethodDelegate(RenderMethod)

This API supports the product infrastructure and is not intended to be used directly from your code. Assigns an event handler delegate to render the server control and its content into its parent control.(Inherited from Control.)

System_CAPS_pubmethodSetTraceData(Object, Object)

Sets trace data for design-time tracing of rendering data, using the trace data key and the trace data value.(Inherited from Control.)

System_CAPS_pubmethodSetTraceData(Object, Object, Object)

Sets trace data for design-time tracing of rendering data, using the traced object, the trace data key, and the trace data value.(Inherited from Control.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

System_CAPS_protmethodTrackViewState()

Tracks view state.(Overrides WebControl.TrackViewState().)

NameDescription
System_CAPS_protfieldSystem_CAPS_staticCancelButtonID

Specifies the identifier for the Cancel button. This field is static and read-only.

System_CAPS_pubfieldSystem_CAPS_staticCancelCommandName

Retrieves the command name for the Cancel button. This field is static and read-only.

System_CAPS_protfieldSystem_CAPS_staticCustomFinishButtonID

Retrieves the identifier for a custom Finish button. This field is static and read-only.

System_CAPS_protfieldSystem_CAPS_staticCustomNextButtonID

Retrieves the identifier for a custom Next button. This field is static and read-only.

System_CAPS_protfieldSystem_CAPS_staticCustomPreviousButtonID

Retrieves the identifier for a custom Previous button. This field is static and read-only.

System_CAPS_protfieldSystem_CAPS_staticDataListID

Retrieves the identifier for the sidebar DataList collection. This field is static and read-only.

System_CAPS_protfieldSystem_CAPS_staticFinishButtonID

Retrieves the identifier for the Finish button. This field is static and read-only.

System_CAPS_protfieldSystem_CAPS_staticFinishPreviousButtonID

Retrieves the identifier for the Previous button on the Finish step. This field is static and read-only.

System_CAPS_pubfieldSystem_CAPS_staticHeaderPlaceholderId

Gets the ID of the HeaderTemplate placeholder in a Wizard control.

System_CAPS_pubfieldSystem_CAPS_staticMoveCompleteCommandName

Retrieves the command name that is associated with the Finish button. This field is static and read-only.

System_CAPS_pubfieldSystem_CAPS_staticMoveNextCommandName

Retrieves the command name that is associated with the Next button. This field is static and read-only.

System_CAPS_pubfieldSystem_CAPS_staticMovePreviousCommandName

Retrieves the command name that is associated with the Previous button. This field is static and read-only.

System_CAPS_pubfieldSystem_CAPS_staticMoveToCommandName

Retrieves the command name that is associated with each of the sidebar buttons. This field is static and read-only.

System_CAPS_pubfieldSystem_CAPS_staticNavigationPlaceholderId

Gets the ID of the StartNavigationTemplate placeholder in a Wizard control.

System_CAPS_protfieldSystem_CAPS_staticSideBarButtonID

Retrieves the identifier that is associated with each of the sidebar buttons. This field is static and read-only.

System_CAPS_pubfieldSystem_CAPS_staticSideBarPlaceholderId

Gets the ID of the SideBarTemplate placeholder in a Wizard control.

System_CAPS_protfieldSystem_CAPS_staticStartNextButtonID

Retrieves the identifier that is associated with the Next button on the Start step. This field is static and read-only.

System_CAPS_protfieldSystem_CAPS_staticStepNextButtonID

Retrieves the identifier that is associated with the Next button. This field is static and read-only.

System_CAPS_protfieldSystem_CAPS_staticStepPreviousButtonID

Retrieves the identifier that is associated with the Previous button. This field is static and read-only.

System_CAPS_pubfieldSystem_CAPS_staticWizardStepPlaceholderId

Gets the ID of the WizardStep placeholder in a Wizard control.

NameDescription
System_CAPS_pubeventActiveStepChanged

Occurs when the user switches to a new step in the control.

System_CAPS_pubeventCancelButtonClick

Occurs when the Cancel button is clicked.

System_CAPS_pubeventDataBinding

Occurs when the server control binds to a data source.(Inherited from Control.)

System_CAPS_pubeventDisposed

Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.(Inherited from Control.)

System_CAPS_pubeventFinishButtonClick

Occurs when the Finish button is clicked.

System_CAPS_pubeventInit

Occurs when the server control is initialized, which is the first step in its lifecycle.(Inherited from Control.)

System_CAPS_pubeventLoad

Occurs when the server control is loaded into the Page object.(Inherited from Control.)

System_CAPS_pubeventNextButtonClick

Occurs when the Next button is clicked.

System_CAPS_pubeventPreRender

Occurs after the Control object is loaded but prior to rendering.(Inherited from Control.)

System_CAPS_pubeventPreviousButtonClick

Occurs when the Previous button is clicked.

System_CAPS_pubeventSideBarButtonClick

Occurs when a button in the sidebar area is clicked.

System_CAPS_pubeventUnload

Occurs when the server control is unloaded from memory.(Inherited from Control.)

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodIAttributeAccessor.GetAttribute(String)

This API supports the product infrastructure and is not intended to be used directly from your code. Gets an attribute of the Web control with the specified name.(Inherited from WebControl.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIAttributeAccessor.SetAttribute(String, String)

Sets an attribute of the Web control to the specified name and value.(Inherited from WebControl.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIControlDesignerAccessor.GetDesignModeState()

For a description of this member, see IControlDesignerAccessor.GetDesignModeState.(Inherited from Control.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIControlDesignerAccessor.SetDesignModeState(IDictionary)

For a description of this member, see IControlDesignerAccessor.SetDesignModeState. (Inherited from Control.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIControlDesignerAccessor.SetOwnerControl(Control)

This API supports the product infrastructure and is not intended to be used directly from your code. For a description of this member, see IControlDesignerAccessor.SetOwnerControl. (Inherited from Control.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIParserAccessor.AddParsedSubObject(Object)

For a description of this member, see IParserAccessor.AddParsedSubObject. (Inherited from Control.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodICompositeControlDesignerAccessor.RecreateChildControls()

Enables a designer to recreate the composite control's collection of child controls in the design-time environment.(Inherited from CompositeControl.)

System_CAPS_pubinterfaceSystem_CAPS_privpropertyIControlBuilderAccessor.ControlBuilder

For a description of this member, see IControlBuilderAccessor.ControlBuilder. (Inherited from Control.)

System_CAPS_pubinterfaceSystem_CAPS_privpropertyIControlDesignerAccessor.UserData

For a description of this member, see IControlDesignerAccessor.UserData. (Inherited from Control.)

System_CAPS_pubinterfaceSystem_CAPS_privpropertyIDataBindingsAccessor.DataBindings

For a description of this member, see IDataBindingsAccessor.DataBindings. (Inherited from Control.)

System_CAPS_pubinterfaceSystem_CAPS_privpropertyIDataBindingsAccessor.HasDataBindings

For a description of this member, see IDataBindingsAccessor.HasDataBindings. (Inherited from Control.)

System_CAPS_pubinterfaceSystem_CAPS_privpropertyIExpressionsAccessor.Expressions

For a description of this member, see IExpressionsAccessor.Expressions. (Inherited from Control.)

System_CAPS_pubinterfaceSystem_CAPS_privpropertyIExpressionsAccessor.HasExpressions

For a description of this member, see IExpressionsAccessor.HasExpressions. (Inherited from Control.)

NameDescription
System_CAPS_pubmethodEnableDynamicData(Type)

Overloaded. Enables Dynamic Data behavior for the specified data control.(Defined by DataControlExtensions.)

System_CAPS_pubmethodEnableDynamicData(Type, IDictionary<String, Object>)

Overloaded. Enables Dynamic Data behavior for the specified data control.(Defined by DataControlExtensions.)

System_CAPS_pubmethodEnableDynamicData(Type, Object)

Overloaded. Enables Dynamic Data behavior for the specified data control.(Defined by DataControlExtensions.)

System_CAPS_pubmethodFindDataSourceControl()

Returns the data source that is associated with the data control for the specified control.(Defined by DynamicDataExtensions.)

System_CAPS_pubmethodFindFieldTemplate(String)

Returns the field template for the specified column in the specified control's naming container.(Defined by DynamicDataExtensions.)

System_CAPS_pubmethodFindMetaTable()

Returns the metatable object for the containing data control.(Defined by DynamicDataExtensions.)

System_CAPS_pubmethodGetDefaultValues()

Overloaded. Gets the collection of the default values for the specified data control.(Defined by DynamicDataExtensions.)

System_CAPS_pubmethodGetMetaTable()

Overloaded. Gets the table metadata for the specified data control.(Defined by DynamicDataExtensions.)

System_CAPS_pubmethodSetMetaTable(MetaTable)

Overloaded. Sets the table metadata for the specified data control.(Defined by DynamicDataExtensions.)

System_CAPS_pubmethodSetMetaTable(MetaTable, IDictionary<String, Object>)

Overloaded. Sets the table metadata and default value mapping for the specified data control.(Defined by DynamicDataExtensions.)

System_CAPS_pubmethodSetMetaTable(MetaTable, Object)

Overloaded. Sets the table metadata and default value mapping for the specified data control.(Defined by DynamicDataExtensions.)

System_CAPS_pubmethodTryGetMetaTable(MetaTable)

Overloaded. Determines whether table metadata is available.(Defined by DynamicDataExtensions.)

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.

    System_CAPS_noteNote

    If you are using Microsoft Visual Studio 2005, note that the ActiveStepIndex is persisted in Source view. If you change the WizardSteps property in Design view by clicking the sidebar buttons, and you then run the page, the first step of the Wizard control might not be shown because the ActiveStepIndex might be pointing to a different step.

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.

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.

The Wizard control inherits the following command names from the View class and MultiView class: NextViewCommandName, PreviousViewCommandName, SwitchViewByIDCommandName, and SwitchViewByIndexCommandName. The Wizard control ignores these command names and does not include any special logic to enable these commands to automatically work for navigation. If a command name is removed or is missing from a button in the Wizard control, no exception is thrown. For example, if the StartNavigationTemplate button is missing a value for CommandName, no exception is thrown.

You can use the MoveTo method or the ActiveStepIndex property to dynamically change the step that is currently displayed in the Wizard control.

System_CAPS_noteNote

If you programmatically add a WizardStep in the Page_Load event handler, you must add the navigation to that step prior to the page loading.

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.

System_CAPS_noteNote

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.

The Wizard control lets you specify the layout of the control without requiring you to use an HTML table element. Instead, you can use a LayoutTemplate element to specify the layout. In the template, you create placeholder controls to indicate where items should be dynamically inserted into the control. (This is similar to how the template model for the ListView control works.) For more information, see the Wizard.LayoutTemplate property.

For information about how to configure this control so that it generates markup that conforms to accessibility standards, see Accessibility in Visual Studio and ASP.NET and ASP.NET Controls and Accessibility.

<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>

The following code example demonstrates how to define a Wizard control to collect a user's name and address, with the option to enter a separate shipping address. If the user does not select SeparateShippingCheckBox, thereby issuing a request to add a separate shipping address, the Wizard control moves directly from Step2 to Finish. On the Finish step, the user has the option to return to the beginning of the Wizard control by clicking GoBackButton; however, it takes the user to Step2 because the AllowReturn property for Step1 is set to false.

System_CAPS_security Security Note

This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see Script Exploits Overview.

<%@ Page Language="C#" CodeFile="WizardClass.cs" Inherits="WizardClasscs_aspx" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
  <head runat="server">
    <title>ASP.NET Example</title>
</head>
<body>
    <form id="form1" runat="server">    
      <asp:Wizard id="Wizard1" 
        runat="server" 
        onfinishbuttonclick="OnFinishButtonClick" 
        backcolor="#EFF3FB" 
        font-names="Verdana" 
        font-size="0.8em"
        borderwidth="1px" 
        bordercolor="#B5C7DE" 
        style="font-size: medium; font-family: Verdana;" 
        onactivestepchanged="OnActiveStepChanged">       
      <StepStyle forecolor="#333333" 
        font-size="0.8em" />
        <WizardSteps>        
          <asp:WizardStep id="Step1" 
            title="One"
            allowreturn="false" 
            runat="server" >
            Welcome to the Wizard example.  This step's AllowReturn property is set 
            to false, so after you leave this step you will not be able to return to it.
          </asp:WizardStep>          
          <asp:WizardStep id="Step2"
            title="Two" 
            runat="server" >
            <!-- ... Put UI elements here ... -->
            Please enter your billing information.
            <br />
            Name:<br />
            <asp:TextBox runat="server" 
              id="BillingName" 
              width="226px" 
              height="17px" /> 
            <br />
            E-mail Address:<br />
            <asp:TextBox runat="server" 
              id="EmailAddress" 
              width="224px" 
              height="17px" />
            <br />
            Address Line 1: <br />
            <asp:TextBox runat="server" 
              id="BillingAddressLine1" 
              width="314px" 
              height="17px" />
            <br />
            Address Line 2: <br />
            <asp:TextBox runat="server" 
              id="BillingAddressLine2" 
              width="314px" 
              height="17px" />
            <br />
            City: <br />
            <asp:TextBox runat="server" 
              id="BillingCity" 
              width="155px" 
              height="17px" /> 
            <br />
            State: <br />
            <asp:TextBox runat="server" 
              id="BillingState" 
              width="75px" 
              height="17px" /> 
            <br />
            ZIP Code: <br />
            <asp:TextBox runat="server" 
              id="BillingZip" 
              height="17px" />
            <br /><br />
            <asp:CheckBox runat="server" 
              id="SeparateShippingCheckBox" 
              text="Please check here if you would like to add a separate shipping address." />
          </asp:WizardStep>          
          <asp:WizardStep id="Step3" 
            title="Three" 
            runat="server" >
            <!-- Gather the shipping address in this step if CheckBox1 was selected. -->
            Please enter your shipping information.
            <br />
                Name:<br />
                <asp:TextBox runat="server" 
                  id="ShippingName" 
                  height="17px" /> 
                <br />
                Address Line 1: <br />
                <asp:TextBox runat="server" 
                  id="ShippingAddress1" 
                  width="370px" 
                  height="17px" />
                <br />
                Address Line 2: <br />
                <asp:TextBox runat="server" 
                  id="ShippingAddress2" 
                  width="370px" 
                  height="17px" />
                <br />
                City: <br />
                <asp:TextBox runat="server" 
                  id="ShippingCity" 
                  height="17px" /> 
                <br />
                State: <br />
                <asp:TextBox runat="server" 
                  id="ShippingState" 
                  width="65px" 
                  height="17px" />
                <br /> 
                ZIP Code: <br />
                <asp:TextBox runat="server" 
                  id="ShippingZip" 
                  height="17px" />
          </asp:WizardStep>
          <asp:WizardStep id="Finish" 
            title="Finish"
            runat="server" >
            <!-- Put UI elements here for the Finish step. -->
            <asp:Button runat="server" 
              id="GoBackButton" 
              text="Go Back to Step 2" 
              onclick="OnGoBackButtonClick"
              forecolor="#284E98" 
              font-names="Verdana"
              font-size="1.0em" 
              borderstyle="Solid" 
              borderwidth="1px" 
              bordercolor="#507CD1" 
              backcolor="White" /> 
          </asp:WizardStep>          
          <asp:WizardStep runat="server" 
            steptype="Complete" 
            title="Complete" 
            id="Complete">
            <asp:Label runat="server" 
              id="CompleteMessageLabel" 
              width="408px" 
              height="24px">
            </asp:Label>
          </asp:WizardStep>
        </WizardSteps> 
        <NavigationButtonStyle forecolor="#284E98" 
          font-names="Verdana"
          font-size="1.0em" 
          borderstyle="Solid" 
          borderwidth="1px" 
          bordercolor="#507CD1" 
          backcolor="White" />
        <HeaderStyle forecolor="White" 
          horizontalalign="Center" 
          font-size="0.9em" 
          font-bold="True"
          backcolor="#284E98" 
          borderstyle="Solid" 
          bordercolor="#EFF3FB" 
          borderwidth="2px" />
        <SideBarStyle verticalalign="Top" 
          horizontalalign="Center"
          font-size="0.8em" 
          forecolor="#000099"
          backcolor="#EFF3FB"
          width="45px" />
        <HeaderTemplate>
          <b>Wizard Example</b>
        </HeaderTemplate>
      </asp:Wizard>
    </form>
  </body>
</html>

The following code example is the code-behind file for the Web page used in the preceding example.

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class WizardClasscs_aspx : System.Web.UI.Page
{
    protected void OnFinishButtonClick(Object sender, WizardNavigationEventArgs e)
    {
        // The OnFinishButtonClick method is a good place to collect all
        // the data from the completed pages and persist it to the data store. 

        // For this example, write a confirmation message to the Complete page
        // of the Wizard control.
        Label tempLabel = (Label)Wizard1.FindControl("CompleteMessageLabel");
        if (tempLabel != null)
        {
            tempLabel.Text = "Your order has been placed. An e-mail confirmation will be sent to "
            + (EmailAddress.Text.Length == 0 ? "your e-mail address" : EmailAddress.Text) + ".";
        }
    }

    protected void OnGoBackButtonClick(object sender, EventArgs e)
    {
        // The GoBackButtonClick event is raised when the GoBackButton
        // is clicked on the Finish page of the Wizard.  

        // Check the value of Step1's AllowReturn property.
        if (Step1.AllowReturn)
        {
            // Return to Step1.
            Wizard1.ActiveStepIndex = Wizard1.WizardSteps.IndexOf(this.Step1);
        }
        else
        {
            // Step1 is not a valid step to return to; go to Step2 instead.
            Wizard1.ActiveStepIndex = Wizard1.WizardSteps.IndexOf(this.Step2);
            Response.Write("ActiveStep is set to Step2 because Step1 has AllowReturn set to false.");
        }
    }

    protected void OnActiveStepChanged(object sender, EventArgs e)
    {
        // If the ActiveStep is changing to Step3, check to see whether the 
        // SeparateShippingCheckBox is selected.  If it is not, skip to the
        // Finish step.
        if (Wizard1.ActiveStepIndex == Wizard1.WizardSteps.IndexOf(this.Step3))
        {
            if (this.SeparateShippingCheckBox.Checked)
            {
                Wizard1.MoveTo(this.Step3);
            }
            else
            {
                Wizard1.MoveTo(this.Finish);
            }
        }
    }
}

.NET Framework
Available since 2.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft