ARTICLE

WizardControl in ASP.NET

Posted by Rohatash Kumar Articles | ASP.NET using VB.NET November 20, 2010
In this article we will learn how to use wizard control in ASP.NET.
 
Reader Level:

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.

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

wizard7.gif
Figure 6.

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

wizard8.gif

Figure 7.

now click on the step3 and select game from dropdownlist.

wizard9.gif

Figure 8.

Now click on the finish step.

wizard10.gif

Figure 9.

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


Login to add your contents and source code to this article
share this article :
post comment
 
Nevron Diagram
Become a Sponsor
PREMIUM SPONSORS
  • Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
    ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications. Visit DynamicPDF here
Nevron Diagram
Become a Sponsor