This documentation is archived and is not being maintained.

Wizard::AllowNavigationToStep Method

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.

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

protected:
virtual bool AllowNavigationToStep(
	int index
)

Parameters

index
Type: System::Int32
The index of the WizardStepBase object being checked.

Return Value

Type: System::Boolean
false if the index passed in refers to a WizardStepBase that has already been accessed and its AllowReturn property is set to false; otherwise, true.

The AllowNavigationToStep method can be accessed from a derived class only because of its protected modifier. In a derived class, you can use the AllowNavigationToStep method to determine whether the index that is passed in can be used to set the ActiveStepIndex property. The AllowNavigationToStep method will return false if the index that is passed in refers to a WizardStepBase object that has already been accessed and has its AllowReturn property set to false; otherwise, it will return true.

The following code example demonstrates how to create a derived class named CustomWizard and override the OnSideBarButtonClick method. When a button on the sidebar area of the CustomWizard control is clicked, the AllowNavigationToStep method is called to determine whether the selected step can be accessed. A message is then written to the containing Web page informing the user of what has occurred.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

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.
Show: