Asp Control ASP.Net

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>



    Wizard Demo


    
    

    

Wizard Demo


             DisplayCancelButton="True" 
        OnCancelButtonClick="wzrdMorning_CancelButtonClick" 
        OnActiveStepChanged="wzrdMorning_ActiveStepChanged" 
        OnFinishButtonClick="Button_Click" 
        OnNextButtonClick="Button_Click" 
        OnPreviousButtonClick="Button_Click" 
        OnSideBarButtonClick="Button_Click" 
        BackColor="#E6E2D8" 
        BorderColor="#999999" 
        BorderWidth="1px" 
        Font-Names="Verdana" Font-Size="0.8em" >
       
                   Title="Step 1" 
          StepType="Start">
          

Wake Up


          Rise and shine sleepy head.
         
                   Title="Step 2">
          

Shower


          Make it cold!
         
                   Title="Step 3" 
          AllowReturn="False">
          

Take Medicine


          Only do this once.
         
                   Title="Step 4">
          

Brush Teeth


          Don't forget to floss.
         
                   Title="Step 5">
          

Get Dressed


          Got to look good.
         
                   Title="Step 6">
          

Eat Breakfast


          The most important meal of the day.
         
                   Title="Step 7" 
          StepType="Finish">
          

Out the Door


          Meet the world!
         
                   StepType="Complete" 
          Title="Complete">
          

Complete!


          Your morning routine is now complete.
         
       

                         BorderColor="#E6E2D8" 
                  BorderStyle="Solid" 
                  BorderWidth="2px" />
                            Font-Size="0.9em" 
                     VerticalAlign="Top" />
                                     BorderColor="#C5BBAF" 
                              BorderStyle="Solid"
                            BorderWidth="1px" 
                            Font-Names="Verdana" 
                            Font-Size="0.8em" 
                            ForeColor="#1C5E55" />
       
                           BorderColor="#E6E2D8" 
                    BorderStyle="Solid" 
                    BorderWidth="2px"
                  Font-Bold="True" 
                  Font-Size="0.9em" 
                  ForeColor="White" 
                  HorizontalAlign="Center" />
     
     
     Select a step:
                            runat="server" 
                     AutoPostBack="True" 
                     OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
       1
       2
       3
       4
       5
       6
       7
     
     
     
     Active Step: 
     
     
     ActiveStepIndex: 
     
     
     StepType: 
     
     
     Button Info: 
     
     
     
      History
      
    

    


File: Default.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections;
public partial class _Default : System.Web.UI.Page 
{
  protected void wzrdMorning_ActiveStepChanged(object sender, EventArgs e)
   {
     lblActiveStep.Text = wzrdMorning.ActiveStep.Title;
     lblActiveStepIndex.Text = wzrdMorning.ActiveStepIndex.ToString();
     lblStepType.Text = wzrdMorning.ActiveStep.StepType.ToString();
     ICollection steps = wzrdMorning.GetHistory();
     string str = "";
     foreach (WizardStep step in steps)
     {
       str += step.Title + "
";
     }
       lblHistory.Text = str;
    }
  
  protected void Button_Click(object sender, WizardNavigationEventArgs e){
     string str = "Current Index: " +
         e.CurrentStepIndex.ToString() +
         ".   Next Step: " + e.NextStepIndex.ToString();
     lblButtonInfo.Text = str;
   }
   
  protected void wzrdMorning_CancelButtonClick(object sender, EventArgs e){
     lblActiveStep.Text = "";
     lblActiveStepIndex.Text = "";
     lblStepType.Text = "";
     lblButtonInfo.Text = "Canceled";
     wzrdMorning.Visible = false;
   }
   
  protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) {
     DropDownList ddl = (DropDownList)sender;
     int index = ddl.SelectedIndex;
     WizardStepBase step = wzrdMorning.WizardSteps[index];
     wzrdMorning.MoveTo(step);
   }
 }