WizardControl in ASP.NET using VB.NET

In this article we will learn how to use wizard control in ASP.NET.
  • 1628

In this article we will learn how to use wizard control in ASP.NET.

Wizard Control

wizard interface will be used when we require a user to input a lot of data. Wizard enables us to take the data from the user a series of multiple steps.

Properties: This control has the following properties.

wizard1.gif
 

Figure 1.

For example:

Drag wizard control from toolbox on the form. form looks like this.

wizard2.gif
 

Figure 2.

By default wizard control has two step but we can increase the the number of step in wizard by wizardSteps collection property. such as
 

wizard3.gif
 

Figure 3.

After increase number of step in wizard control looks like this.

wizard4.gif
 

Figure 4.

To make colorful click on the control and select auto format and select colorful, classic, professional, simple.

wizard5.gif
 

Figure 5.

 

Step1

Now click on step1 on the form and drag one label and dropdownlist1 control from the toolbox on the form.

Step2

Now click on step2 on the form and drag one label and dropdownlist2 control from the toolbox on the form.

Step3

Now click on step3 on the form and drag one label and dropdownlist3 control from the toolbox on the form.

Finish step

Now click on the finish step on the form and drag three label control from the toolbox on the form.

Now double click on the form and add the below code.

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

   

        If Wizard1.ActiveStepIndex >= 1 Then

            Label4.Text = "The value selected on Step 1 is: " & DropDownList1.SelectedItem.Text

        End If

        If Wizard1.ActiveStepIndex >= 2 Then

            Label5.Text = "The value selected on Step 2 is: " & DropDownList2.SelectedItem.Text

        End If

        If Wizard1.ActiveStepIndex >= 3 Then

            Label6.Text = "The value selected on Step 3 is: " & DropDownList3.SelectedItem.Text

        End If

        Label1.Text = "The value selected on Step 1 is: " & DropDownList1.SelectedItem.Text

        Label2.Text = "The value selected on Step 2 is: " & DropDownList2.SelectedItem.Text

        Label3.Text = "The value selected on Step 3 is: " & DropDownList3.SelectedItem.Text

    End Sub

 

Now save and run the application.

wizard6.gif
Figure 6.
 

Now select the number suppose 6 from dropdownlist and click on the second step and select color.
 

wizard7.gif
 

Figure 7.
 

now click on the step3 and select game from dropdownlist.

wizard8.gif
 

Figure 8.
 

Now click on the finish step.

wizard9.gif
 

Figure 9.
 

If we want to see the previous data than the click on the previous button.

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.