ASP.NET Whidbey Overview
page 4 of 14
by Steven Smith
Feedback
Average Rating: 
Views (Total / Last 10 Days): 59357/ 129

Wizard Control

A common requirement in data entry or registration form pages is to collect user data across a series of pages.  For instance, a bank account application might require personal information from one or more applications, business information, financial information, etc., each on separate forms.  Or an ecommerce application my collect information about billing address, shipping address, and payment on separate forms.  In ASP.NET 1.x, this can be done, but there is not built-in support for it, so a lot of code must be written to support updating the page state, or many separate forms must be written and state managed between them.  It's messy.

The Wizard web control is designed to make these scenarios easier.  The wizard control allows the developer to create templated "steps" within the control, and manages the state throughout the steps.  Validation within individual steps can be completed without incomplete steps' RequiredFieldValidators firing (as is a problem in 1.x).  Users can navigate forward, backward, or jump to a specific step within the wizard.

At design time, it's very easy to manipulate the Wizard and its step templates, as this screenshot demonstrates:

Wizard Control Design Time

Here's an example of a very simple Wizard control in action, using the March 2004 Preview build of VS2005:

<%@ page language="C#" %>

<script runat="server">

void Wizard1_FinishButtonClick (object sender, WizardNavigationEventArgs e)

{

Response.Write ("Finish clicked!");

}

</script>

<html>

<head runat="server">

<title>Untitled Page</title>

</head>

<body>

<form id="form1" runat="server">

<div>

<asp:Wizard ID="Wizard1" Runat="server" SideBarEnabled="true" OnFinishButtonClick="Wizard1_FinishButtonClick">

<WizardSteps>

<asp:WizardStep Runat="server" Title="Step 1">

This is content for STEP 1.

</asp:WizardStep>

<asp:WizardStep Runat="server" Title="Step 2">

This is content for STEP 2.

</asp:WizardStep>

</WizardSteps>

</asp:Wizard>

</div>

</form>

</body>

</html>


View Entire Article

User Comments

Title: very good article   
Name: raja raja
Date: 2009-12-04 7:57:23 AM
Comment:
very good and informative website.
Title: nice artical   
Name: abdulla hussein
Date: 2007-04-29 6:28:16 AM
Comment:
I like it , it is very informative . thanks alot man

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2021 ASPAlliance.com  |  Page Processed at 2021-12-04 6:06:01 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search