Checkout wizard (VB) : Wizard « Asp Control « ASP.Net

ASP.Net
1. ADO.net Database
2. Ajax
3. Asp Control
4. Collections
5. Components
6. Data Binding
7. Development
8. File Directory
9. HTML Control
10. Language Basics
11. Login Security
12. Mobile Control
13. Network
14. Page
15. Request
16. Response
17. Server
18. Session Cookie
19. Sitemap
20. Theme Style
21. User Control and Master Page
22. Validation by Control
23. Validation by Function
24. WebPart
25. WPF
26. XML
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
ASP.Net » Asp Control » Wizard 
Checkout wizard (VB)

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="Checkout" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Chapter 20 Checkout Wizard</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:Wizard ID="wizCheckout" runat="server" ActiveStepIndex="0" 
            Width="739px" >
            <WizardSteps>
                <asp:WizardStep ID="WizardStep1" runat="server"
                    Title="Step 1: Contact Info">
                    Please enter your contact information:<br /><br />
                    <table>
                      <tr>
                        <td>First Name:</td>
                        <td>
                            <asp:TextBox ID="txtFirstName" runat="server"
                                Height="22px" Width="200px"></asp:TextBox>
                            <asp:RequiredFieldValidator
                                ID="RequiredFieldValidator1" 
                                runat="server" 
                                ControlToValidate="txtFirstName"
                                ErrorMessage="First Name is required."></asp:RequiredFieldValidator>
                        </td>
                      </tr>
                      <tr>
                        <td>Last name:</td>
                        <td>
                            <asp:TextBox ID="txtLastName" runat="server"
                                Height="22px" Width="200px"></asp:TextBox>
                            <asp:RequiredFieldValidator
                                ID="RequiredFieldValidator2" 
                                runat="server" 
                                ControlToValidate="txtLastName"
                                ErrorMessage="Last Name is required."></asp:RequiredFieldValidator>
                        </td>
                      </tr>
                      <tr>
                        <td>Email:</td>
                        <td>
                            <asp:TextBox ID="txtEmail" runat="server"
                                Height="22px" Width="200px"></asp:TextBox>
                            <asp:RequiredFieldValidator
                                ID="RequiredFieldValidator3" 
                                runat="server" 
                                ControlToValidate="txtEmail"
                                ErrorMessage="Email is required."></asp:RequiredFieldValidator>
                        </td>
                      </tr>
                    </table>
                </asp:WizardStep>
                <asp:WizardStep ID="WizardStep2" runat="server"
                     Title="Step 2: Shipping Method">
                    Please select a shipping method:<br /><br />
                    <asp:RadioButton ID="rdoUPSGround" runat="server"
                        Checked="True" GroupName="ShipVia" Text="UPS Ground" />
                    <br />
                    <asp:RadioButton ID="rdoUPS2Day" runat="server"
                        GroupName="ShipVia" Text="UPS Second Day" />
                    <br />
                    <asp:RadioButton ID="rdoFedEx" runat="server"
                        GroupName="ShipVia" Text="Federal Express Overnight" />
                    <br />
                </asp:WizardStep>
                <asp:WizardStep ID="WizardStep3" runat="server"
                    Title="Step 3: Credit Card Info">
                    Please enter your credit card information:<br />
                    <br />
                    <table>
                      <tr>
                        <td>
                            <div style="text-align: right">
                                <asp:ListBox ID="lstCardType"
                                    runat="server">
                                    <asp:ListItem Selected="True"
                                        Value="VISA">Visa</asp:ListItem>
                                    <asp:ListItem Value="MC">
                                        MasterCard</asp:ListItem>
                                    <asp:ListItem Value="AMEX">
                                        American Express</asp:ListItem>
                                </asp:ListBox>
                            </div>
                        </td>
                        <td>Card Number:</td>
                        <td>
                            <asp:TextBox ID="txtCardNumber" runat="server"
                                Height="22px" Width="262px"></asp:TextBox>
                        </td>
                      </tr>
                      <tr>
                        <td>Expiration Date:
                        </td>
                        <td valign="middle">
                            <asp:DropDownList ID="ddlExpirationMonth"
                                runat="server">
                                <asp:ListItem Value="1">January</asp:ListItem>
                                <asp:ListItem Value="2">February</asp:ListItem>
                                <asp:ListItem Value="3">March</asp:ListItem>
                                <asp:ListItem Value="4">April</asp:ListItem>
                                <asp:ListItem Value="5">May</asp:ListItem>
                                <asp:ListItem Value="6">June</asp:ListItem>
                                <asp:ListItem Value="7">July</asp:ListItem>
                                <asp:ListItem Value="8">August</asp:ListItem>
                                <asp:ListItem Value="9">September</asp:ListItem>
                                <asp:ListItem Value="10">October</asp:ListItem>
                                <asp:ListItem Value="11">November</asp:ListItem>
                                <asp:ListItem Value="12">December</asp:ListItem>
                            </asp:DropDownList>&nbsp;
                            <asp:DropDownList ID="ddlExpirationYear"
                                runat="server">
                            </asp:DropDownList>
                        </td>
                      </tr>
                    </table>
                </asp:WizardStep>
            </WizardSteps>
        </asp:Wizard>
    </div>
    </form>
</body>
</html>

File: Default.aspx.vb


Partial Class Checkout
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, _
            ByVal e As System.EventArgsHandles Me.Load
        If Not IsPostBack Then
            wizCheckout.ActiveStepIndex = 0
            Dim iYear As Integer
            For iYear = DateTime.Now.Year To DateTime.Now.Year + 5
                ddlExpirationYear.Items.Add(iYear.ToString())
            Next
        End If
    End Sub

    Protected Sub wizCheckout_CancelButtonClick(ByVal sender As Object, _
            ByVal e As System.EventArgsHandles wizCheckout.CancelButtonClick
        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
    End Sub

End Class

 
Related examples in the same category
1. Basic Wizard
2. how to set up and use a wizard.
3. Wizard template
4. Checkout wizard
5. Wizard ActiveStepIndex
6. Wizard history
7. Use WizardStep
8. Wizard Demo
9. Wizard finish button click event
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.