Wizard Control in ASP.NET

In this article, you will learn how use Wizard control with its commitment model in ASP.NET. ASP.NET, ASP.NET Wizard Control, Wizard Commitment Model
  • 1993
Download Files:
 

The Wizard control provides navigation through a series of steps that collect information step-by-step from a user. The basic Wizard control collects an information on the first WizardStep and displays it on the final step.

The Wizard Commitment Model allows commit as you go or at the end model. Here we explain how Wizard Commitment model works in ASP.NET.

Sample Wizard Control

Wizard-1.gif

Here we have the design page in which we insert a Wizard Control and three labels to display the information to the user on the complete WizardStep for confirmation. You can also change the formatting of control the Wizard task as shown above.

Wizard Commit As You Go


This Wizard works as commit as you go where user's selection is written out to a label each time when user click a next button. Lets see an example,

Wizard 2.gif

Since each step in this process is a pre-requisite for the next step and every is navigated independently it makes sense to commit and process these steps individually.

Wizard-3.gif

Here is the coding to display the information provided by user incremently.

Sub GetFavoriteNumerOnActiveStepIndex(ByVal sender As Object, ByVal e As EventArgs)
   If Wizard1.ActiveStepIndex >= 1
Then
      Label1.Text = "Step 1: Your sunshine is " & DropDownList1.SelectedItem.Text &"."
   End If
   If Wizard1.ActiveStepIndex >= 2 Then
      Label2.Text = "Step 2: Your favorite color is " & DropDownList2.SelectedItem.Text & "."
   End If
   If Wizard1.ActiveStepIndex >= 3 Then
      Label3.Text = "Step 3: Your favorite indian designation is " & DropDownList3.SelectedItem.Text & "."
   End If
End Sub

After the final step, the output is shown as

Wizard-4.gif

Wizard Commit At the End


In the commit at the end model the developer handles writing all of the information collected on each WizardStep incrementally. All of the selections are written out to labels after user click the finish button on the final wizard step. 

Summary


This article shows two Wizard controls. One Wizard control demonstrates the Commit As You Go model and the second Wizard control demonstrates the commit at the end model.
 

Categories

More Articles

© 2019 DotNetHeaven. All rights reserved.