ARTICLE

Wizard Control in ASP.NET

Posted by Sapna Articles | ASP.NET using VB.NET January 12, 2011
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
Download Files:
 
Reader Level:

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.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-2.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-3.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.
 

Login to add your contents and source code to this article
share this article :
post comment
 
6 Months Free & No Setup Fees ASP.NET Hosting!
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.
    Get 2 Months Free of ASP.NET Hosting for Only $4.95/month! Receive FREE MS SQL and MySQL Databases Including ASP.NET 4/3.5, MVC 3.0, Silverlight 4, Windows 2008/IIS 7.0 Plus FREE IIS 7 Modules. Host UNLIMITED ASP.NET Web Sites - Click Here!
6 Months Free & No Setup Fees ASP.NET Hosting!
Become a Sponsor