Asp Control ASP.Net

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



    Chapter 20 Checkout Wizard


    
    

        Halloween Superstore - Checkout
        
                    DisplayCancelButton="True"
            OnCancelButtonClick="wizCheckout_CancelButtonClick" >
            
                                    Title="Step 1: Contact Info">
                    Please enter your contact information:
                    
                      
                        
                        
                      
                      
                        
                        
                      
                      
                        
                        
                      
                    

                            First Name:
                        

                                                            Height="22px" Width="200px">
                                                            ID="RequiredFieldValidator1" 
                                runat="server" 
                                ControlToValidate="txtFirstName"
                                ErrorMessage="First Name is required.">
                        

                            Last name:
                        

                                                            Height="22px" Width="200px">
                                                            ID="RequiredFieldValidator2" 
                                runat="server" 
                                ControlToValidate="txtLastName"
                                ErrorMessage="Last Name is required.">
                        

                            Email:
                        

                                                            Height="22px" Width="200px">
                                                            ID="RequiredFieldValidator3" 
                                runat="server" 
                                ControlToValidate="txtEmail"
                                ErrorMessage="Email is required.">
                        

                
                                     Title="Step 2: Shipping Method">
                    Please select a shipping method:
                                            Checked="True" GroupName="ShipVia" Text="UPS Ground" />
                    
                                            GroupName="ShipVia" Text="UPS Second Day" />
                    
                                            GroupName="ShipVia" Text="Federal Express Overnight" />
                    
                
                                    Title="Step 3: Credit Card Info">
                    Please enter your credit card information:
                    
                    
                      
                        
                        
                        
                      
                      
                        
                        
                                                            runat="server">
                                January
                                February
                                March
                                April
                                May
                                June
                                July
                                August
                                September
                                October
                                November
                                December
                             
                                                            runat="server">
                            
                        
                      

                    

                                                            runat="server">
                                                                    Value="VISA">Visa
                                
                                    MasterCard
                                
                                    American Express
                            
                        

                            Card Number:
                        

                                                            Height="22px" Width="262px">
                        

                            Expiration Date:
                        

                
            

        
    

    


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 Checkout : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            wizCheckout.ActiveStepIndex = 0;
            int year = DateTime.Now.Year;
            for (; year < DateTime.Now.Year + 6; year++)
                ddlExpirationYear.Items.Add(year.ToString());
        }
    }
    protected void wizCheckout_CancelButtonClick(object sender, EventArgs e)
    {
        wizCheckout.ActiveStepIndex = 0;
        txtFirstName.Text = "";
        txtLastName.Text = "";
        txtEmail.Text = "";
        rdoUPSGround.Checked = true;
        rdoUPS2Day.Checked = false;
        rdoFedEx.Checked = false;
        lstCardType.SelectedIndex = 0;
        txtCardNumber.Text = "";
        ddlExpirationMonth.SelectedIndex = 0;
        ddlExpirationYear.SelectedIndex = 0;
    }
}