Skip Navigation LinksASP.Net 2.0 Training : ASP.Net:Wizard Control
Banner for ASP.Net 2.0 training classes in Visual Basic 2005 

Skip Navigation Links
Visit my other site:

certification training

Free Flash tutorials and training

Free Dreamweaver Video Tutorials

Free PHP Training

Visual Basic Windows Training




If you like this site please link to it


Wizard Control

The wizard control can be used to divide a large form into small subforms

A wizard has more features than a multiView control

It contains one or more wizardStep controls

Only one can be displayed at a time

Properties

CancelDestinationPageURL

The URL the user is sent when they click cancel

DisplayCancelButton

Hide or display cancel button

DisplaySideBar

Hide or display the Wizard’s side bar which displays a list of all the steps

FinishDestinationPageURL

The URL the user is sent when they click the finish button

headerText

Text that appears at the top of the wizard control


Templates

FinishNavigationTemplate

Control appearance of navigation area of the finish step

HeaderTemplate

Control appearance of the header area of the wizard control

SideBarTemplate

Control the appearance of the sidebar of the wizard control

StartNavigationTemplate

Control the appearance of the navigation area of the start step

StepNavigationTemplate

Control the appearance of the navigation area of steps that are not the complete, finish or start steps


Method

MoveTo()

Move to a wizardStep


Events

ActivateStepChanged

When a new wizardStep gets active

CancelButtonClick

When cancel button clicked

FinishButtonClick

When finish button clicked

NextButtonClick

When next button clicked

PreviousButtonClick

When previous button clicked

SideBarButtonClick

When a sidebar button clicked

WizardStep controls:

Properties

AllowReturn

Prevent or allow a user to return to this step from a future step

StepType

  • Auto – default, position determines the setting
  • Complete – no buttons
  • Finish – previous and finish buttons
  • Start - no previous button
  • Step – previous and next buttons

Title

Title displayed in sidebar

  • Add a new webform
  • Name it wizard.aspx
  • Add a wizard control, name it wizard1

  • Change the headerText property to Survey

  • Click in the wizard control and a container box lets you add to it

  • Click on step2
  • Add a label control
  • Set the text to Enter your name
  • Add a textbox
  • Name it txtName
  • Change the label’s associatedControlID to txtname

  • Click the smart tag and select Add/Remove Wizard Steps

  • Click Add

  • Change the ID to Step 3
  • Add another and name it step4

  • Click OK
  • Click on step3
  • Add a label control
  • Set the text to Enter your email
  • Add a textbox
  • Name it txtEmail
  • Change the label’s associatedControlID to txtEmail

  • Click on step4
  • Type Name: Add a label called lblResultName and clear the text
  • Type Email: Add a label called lblResultEmail and clear the text

  • Go to the code view
  • Select wizard1 and FinishButtonClick event

  • Add this code:

lblResultName.text=txtName.text

lblResultEmail.text=txtEmail.text

  • Select the smart tab and click on autoformat
  • Pick a format

  • test it

To enhance the behavior:

  • Select the smart tag
  • Add/remove wizard steps
  • Click step3
  • Change the stepType to Finish

  • Click Step 4
  • Change the stepType to Complete
  • Make sure step is set to step1

  • Test it


      ASP.Net 2.0 tutorials & training