ASP Net Controls ASP.Net Tutorial

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



   Custom Wizard
   
    .wizardStepContent { padding: 5px; }
    .wizardNavContent { padding: 4px; }
    


   
                  runat="server" 
               HeaderText="Checkout" 
               BackColor="#CCCC99"
               BorderColor="#999999" 
               BorderWidth="1px" 
               Height="200" 
               OnActiveStepChanged="myWizard_ActiveStepChanged" 
               OnNextButtonClick="myWizard_NextButtonClick"
               OnFinishButtonClick="myWizard_FinishButtonClick" 
               OnPreviousButtonClick="myWizard_PreviousButtonClick"
               OnSideBarButtonClick="myWizard_SideBarButtonClick">
      
      
         
         .gif' 
           alt='Checkout <%= myWizard.ActiveStep.Title%>' />
         

      
      
      
                             ID="panSide" 
                    runat="server">
                                      runat="server">
               
                                                     runat="server" 
                                   CommandName="MoveTo" 
                                   ImageUrl='<%# GetStepImage((string)Eval("Title"))%>' />
               

               
                                                     runat="server" 
                                   CommandName="MoveTo" 
                                   ImageUrl='<%# GetSelectedStepImage((string)Eval("Title"))%>' />
               

            
         
      

      
      
      
      
      
      
         
                           ImageUrl="~/images/button_checkout_start.gif"
               CommandName="MoveNext" AlternateText="Sign-In" />
         
      

      
      
         
                           ImageUrl="~/images/button_checkout_previous.gif"
               CommandName="MovePrevious" AlternateText="Previous" />
                           ImageUrl="~/images/button_checkout_next.gif"
               CommandName="MoveNext" AlternateText="Next" />
         
      

      
      
         
                           ImageUrl="~/images/button_checkout_previous.gif"
               CommandName="MovePrevious" AlternateText="Previous" />
                           ImageUrl="~/images/button_checkout_finish.gif"
               CommandName="MoveComplete" AlternateText="Make Payment" />
         
      

      
      
                     Title="Login" StepType="Start">
            Email
            
            Password
            
         
         
         
            Address Line 1:
            
            
            
            Address Line 2:
            
            
            
            City:
            
            
            
            State:
            
            
            
            ZIP/Postal Code:
            
            
         
         
         
            Shipper
            
               Air Mail
               Xpresspost
               Fed Ex
            
         
                     Title="Payment" StepType="Finish"
            AllowReturn="false">
            Payment Type
            
               American Express
               Visa
               Mastercard
            
            
            Expiry Month:
            
            
               01
               02
               03
               04
               05
               06
               07
               08
               09
               10
               11
               12
            
            
            Expiry Year:
            
            
               2005
               2006
               2007
               2008
               2009
               2010
            
            
         
         
         
            
         
      

   
   
   


File: Default.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
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;
public partial class CustomWizard : System.Web.UI.Page
{
    public object GetStepImage(string title)
    {
        return "images/sidebar_" + title + ".gif";
    }
    public object GetSelectedStepImage(string title)
    {
        return "images/sidebar_" + title + "_selected.gif";
    }
    protected void myWizard_ActiveStepChanged(object sender, EventArgs e)
    {
    }
    protected void myWizard_NextButtonClick(object sender, WizardNavigationEventArgs e)
    {
    }
    protected void myWizard_PreviousButtonClick(object sender, WizardNavigationEventArgs e)
    {
    }
    protected void myWizard_FinishButtonClick(object sender, WizardNavigationEventArgs e)
    {
        Label labConfirm = (Label)myWizard.FindControl("labConfirmation");
        labConfirm.Text = "Order has been processed for " + txtEmail.Text;
        labConfirm.Text += "
Shipped via " + drpShipper.SelectedValue;
        labConfirm.Text += "
Payment from " + drpPayment.SelectedValue;
    }
    protected void myWizard_SideBarButtonClick(object sender, WizardNavigationEventArgs e)
    {
        e.Cancel = true;
    }
}