System.Web.UI.WebControls.WizardStepBase.AllowReturn Property

Gets or sets a value indicating whether the user is allowed to return to the current step from a subsequent step in a System.Web.UI.WebControls.WizardStepCollection collection.

Syntax

[System.Web.UI.Filterable(false)]
[System.Web.UI.Themeable(false)]
[System.ComponentModel.DefaultValue(true)]
public virtual bool AllowReturn { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

The WizardStepBase.AllowReturn property can be used to enforce linear navigation in a System.Web.UI.WebControls.Wizard control. If each step has its WizardStepBase.AllowReturn property set to false, the user will not be able to return to a step after it has been accessed. One scenario where you might use this functionality is to disallow a user to return to a step after it has been completed because you are persisting the data to a database as each step is completed. If you save the data after each step and allow the user to return to a step and change information after it has been saved, the saved data might become corrupted. By setting the WizardStepBase.AllowReturn property to false, once the user has left a step, he or she will not be able to return to it and change any values.

The WizardStepBase.AllowReturn property determines how and when the Previous button is not rendered. The following table describes the Previous button rendering behavior.

Linear: Step1 has WizardStepBase.AllowReturn set to false and user action goes to step 2.

Step 2 does not display the Previous button.

Non-Linear: Step1 has WizardStepBase.AllowReturn set to false and user action goes to step 3.

Step 3 does not display the Previous button.

SideBar Buttons: Step 2 has WizardStepBase.AllowReturn set to false , Wizard.DisplaySideBar is set to true, and a user clicks on the SideBar button.

No buttons are automatically disabled on the sidebar when WizardStepBase.AllowReturn is set to false. If a user clicks the button, the action is ignored.

Linear & Non-Linear with Custom Template: The step has a custom navigation template.

No automatic hiding or displaying occurs if WizardStepBase.AllowReturn is set to false when you use a template for navigation. The Previous button should be optional on the template.

Using the Visual Studio Designer and Wizard.ActiveStepIndex : The control has 5 steps, you are working on step 4, and you run the page.

When step 4 is the Wizard.ActiveStepIndex, then the Previous button is rendered. The Previous button is only hidden for WizardStepBase.StepType set to WizardStepType.Step when the preceding step in the history has WizardStepBase.AllowReturn set to false. Since step 4 is rendered first and there are no steps in the history, the Previous button is not hidden.

Start Step and Non-Linear Navigation: A user visits step 3 and step 4 and then step 1 which has WizardStepBase.StepType set to WizardStepType.Start.

The wizard does not add a Previous button when the WizardStepBase.StepType is set to WizardStepType.Start regardless of how the user navigates to that step.

Same Step In History: A user visits step 3 where WizardStepBase.StepType is set to WizardStepType.Step and the user does not commit their actions. They then click on the previous button on step 3.

The wizard control checks to see if the Previous step in the history is the "same" step that the user is currently on. If the step is the same, the wizard control looks back in the history to determine the preceding "different" step and bases the display of the Previous button and destination based on the "different step" in the history.

Note:

When the WizardStepBase.AllowReturn property is set to false, but the Wizard.DisplaySideBar property of the parent control of System.Web.UI.WebControls.WizardStepBase is set to true, clicking on a button in the sidebar area has no effect. The sidebar area is generally displayed to provide nonlinear navigation, so if you are not using the functionality of nonlinear navigation, you may want to set the Wizard.DisplaySideBar property to false.

This property cannot be set by themes or style sheet themes. For more information, see System.Web.UI.ThemeableAttribute and ASP.NET Themes Overview.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0