ASP.NET
  Home arrow ASP.NET arrow Page 4 - A Demo of the Wizard Control in ASP.NET 2....
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP.NET

A Demo of the Wizard Control in ASP.NET 2.0
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 14
    2006-08-15

    Table of Contents:
  • A Demo of the Wizard Control in ASP.NET 2.0
  • The Minimum Wizard
  • A Basic Demo
  • Writing Code for the Steps
  • A Display of the Wizard in Action
  • Source Code of the Page

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    A Demo of the Wizard Control in ASP.NET 2.0 - Writing Code for the Steps


    (Page 4 of 6 )

    When the page loads, Step 1 will be in view and you should make sure that Step 1 is showing in the design view before you browse the page. Here you will be entering the names and clicking the Next button. The names you enter remain in the textboxes. When you click the Next button, the wizard moves to Step 2.

    In Step 2 you will click the calendar control to add a date which will remain in the textbox in Step 2. When you click on the Next button you will move to Step 3.

    In Step 3 you gather up all the information, and when you click on the Finish button you will display it in Step 3's "View Area." The code for the logic followed by the steps is shown in the next paragraph.

    Partial Class wiz
    Inherits System.Web.UI.Page
    Protected Sub Wizard1_FinishButtonClick(ByVal sender As Object, _
    ByVal e As System.Web.UI.WebControls.WizardNavigationEventArgs) _
    Handles Wizard1.FinishButtonClick
    Label1.Visible = True
    TextBox3.Visible = False
    Label2.Visible = False
    Label1.Text = "<font color='blue'>" + TextBox3.Text _
    + "</font>" + "<p></p>" + "<font color='green'>" + _
    TextBox1.Text + " " + TextBox2.Text + "</font>" + _
    "<br/>" + "Your last visit was on  " + TextBox4.Text
    End Sub
    Protected Sub Wizard1_NextButtonClick(ByVal sender As Object, _
    ByVal e As System.Web.UI.WebControls.WizardNavigationEventArgs) _
    Handles Wizard1.NextButtonClick '[logic] if this logic is omitted
    the Label1's text Label 
    would show up 'going from step 2 to three.
    If e.NextStepIndex = 2 Then Label1.Visible = False End If '[/logic] 'The textbox3 contents are carried forward
    to finish 'but it's visibility is set to false
    TextBox3.Visible =
    False 'must be false TextBox3.Text = "We Cordially Welcome You Back" End Sub Protected Sub Calendar1_SelectionChanged(ByVal sender As Object, _ ByVal e As System.EventArgs) Handles Calendar1.SelectionChanged TextBox4.Text = Calendar1.SelectedDate.ToShortDateString End Sub End Class

    A couple of annotations are in the code. The Label1.text after the Finish button is clicked collects all information and presents it. Textbox4 carries the date information from Step 2, while Textbox1 and Textbox2 carry the name information from Step1. If Textbox3 is not set to false in the Finish event, then Textbox3 will show through. The steps are indexed with 0 as the start index. Also note that the UI is represented by a partial class.

    More ASP.NET Articles
    More By Jayaram Krishnaswamy


       · The wizard control makes it so easy to crate a wizard you would not believe....
     

    ASP.NET ARTICLES

    - Developing a Mini ASP.NET AJAX Server Centri...
    - Disadvantages of the ASP.NET MVC Framework
    - Advantages of the ASP.NET MVC Approach
    - ASP.NET Web Forms Weaknesses
    - ASP.NET Web Forms Meets ASP.NET MVC
    - Source Code for Saving and Retrieving Data w...
    - Using GridView to Save and Retrieve Data wit...
    - Handling Dynamic Images in ASP.NET 3.5 AJAX ...
    - Retrieving Data with AJAX and the GridView C...
    - Playing with Images in ASP.NET 3.5 AJAX Appl...
    - Saving and Retrieving Data with AJAX
    - Enhancing PHP Via the ASP.NET AJAX Framework...
    - Enhancing PHP Programming with the ASP.NET A...
    - Classes and ASP.NET AJAX
    - Using ASP.NET AJAX

     
    Best Practices for Windows Vista Migration Presentation
    Dell and Microsoft recently held a series of face-to-face seminars entitled, &qu....

     
    Creating a Culture for Code Reuse
    If you oversee development teams you know that like it or not proprietary and ex....

     
    Keys to Web Application Acceleration: Advances in Delivery Systems
    Accelerate Web apps by up to 5x. Ensure significantly faster access to the Web a....

     
    Optimizing Application Monitoring
    Tired of finding out from your customers that you're offline? This white paper e....

     
    Solaris to Solaris Migration -- Migrating applications from Sun SPARC to Dell PowerEdge R900
    This comprehensive Migration Guide reviews the approach that Principled Technolo....

     




    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
    Stay green...Green IT