Click here to Skip to main content
15,868,037 members
Articles / Web Development / ASP.NET
Article

Wizard Control in ASP.NET 2.0

Rate me:
Please Sign up or sign in to vote.
3.04/5 (9 votes)
17 Jul 20062 min read 32.4K   26   1
Basic Functionality for Asp.net 2.0 wizard control.

Introduction

The  Wizard control in ASP.NET 2.0 help building a web application where you want functionality of wizard.This article will explain the basics of the Wizard Control by creating a web application. 

Creating Web App

  • Open Visual Studio 2005.
  • create new Web Site app.
  • use C# as language.


    From Toolbox, drag a Wizard control onto the Default.aspx. This will create a wizard control with two default steps already in place. Clicking any step allows editing.

    Click on the small box that appears at the upper right side of control to open the wizard menu.

    default

    click on auto format menu entry. and select a scheme you want for your wizard and click ok to apply the scheme.

    After applying the scheme, click Step 1 in wizard Control to activate first step.You can now edit the display of Step 1.

    if we want to get the personal info in first step then drag a Label and TextBox control onto the active area of the wizard, set the label text as First Name.  and drag another Label and TextBox onto the active area and set label text as Last Name and repeat the same process for date of birth.

    you wizard first step will look like this. 

    Sample screenshot

    in second step you can add the text box which can hold some personal description. which look like this.

    Sample screenshot

    Now add a final step which will display all the information about user.

    you can Add/Remove Wizard Steps by right clicking the wizard control and selecting the add/remove option.add new step from this dialog and set the title of the new step to Final info and steptype to Complete. Click OK button.

    Sidebar in final Step is not visible.  Drag three labels onto the wizard control. Name the labels FName, LName, and Desc.

    Sample screenshot

    you can simply use page load function to set values to labels in final step.

    <P>protected void Page_Load(object sender, EventArgs e)</P>
    <P>{</P>
    <P>     FName.Text = TextBoxFName.Text;</P>
    <P>     LName.Text = this.TextBoxLName.Text;</P>
    <P>     Disc.Text    = this.TextBoxDesc.Text;</P>
    <P>}</P>
  • <P>
    Thats it save your app an run it type your value in text boxes and move next and you will get all the info on final step.and you can add click next button event for further functionality on next button click.

  • With wizard control you can easly create simple database wizard for add update and delete and functionalities like quiz.

  • License

    This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

    A list of licenses authors might use can be found here


    Written By
    Software Developer (Senior) ntlsoft
    United Kingdom United Kingdom
    software developer working in C# and asp.net from many years. background with C++,MFC,COM,ActiveX...etc
    mostly worked on management software’s like Workflow Management, CRM,Time & Attendance Management, Marketing Message Management.
    Like to play Cricket , Footy (Arsenal) ,Snooker

    Comments and Discussions

     
    GeneralRegistration Page. Pin
    macupryk6-Dec-07 16:56
    macupryk6-Dec-07 16:56 

    General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

    Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.