Displaying a Wizard : Wizard « ASP.net Controls « ASP.NET Tutorial

ASP.NET Tutorial
1. ASP.Net Instroduction
2. Language Basics
3. ASP.net Controls
4. HTML Controls
5. Page Lifecycle
6. Response
7. Collections
8. Validation
9. Development
10. File Directory
11. Sessions
12. Cookie
13. Cache
14. Custom Controls
15. Profile
16. Configuration
17. LINQ
18. ADO.net Database
19. Data Binding
20. Ajax
21. Authentication Authorization
22. I18N
23. Mobile
24. WebPart
25. 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
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 Tutorial » ASP.net Controls » Wizard 
3. 29. 1. Displaying a Wizard
ActiveStep:                 get the active WizardStep control.

ActiveStepIndex:            set or get the index of the active WizardStep control.

CancelDestinationPageUrl:   URL when clicking Cancel button.

DisplayCancelButton:        hide or display the Cancel button.

DisplaySideBar:             hide or display the Wizard control's sidebar. 

FinishDestinationPageUrl:   URL when clicking the Finish button.

HeaderText:                 header text that appears at the top of the Wizard control.

WizardSteps:                get the WizardStep controls.



The Wizard control supports the following templates:


FinishNavigationTemplate:    appearance of the navigation area of the finish step.

HeaderTemplate:              appearance of the header area.

SideBarTemplate:             appearance of the sidebar area.

StartNavigationTemplate:     appearance of the navigation area of the start step.

StepNavigationTemplate:      appearance of the navigation area of steps that are not start, finish, or complete steps.

The Wizard control also supports the following methods:

GetHistory():     return the collection of WizardStep controls that have been accessed.

GetStepType():    return the type of WizardStep at a particular index. 
                  Possible values are Auto, Complete, Finish, Start, and Step.

MoveTo():         move to a particular WizardStep.


The Wizard control also supports the following events:

ActiveStepChanged:        Called when a new WizardStep becomes the active step.

CancelButtonClick:        Called when the Cancel button is clicked.

FinishButtonClick:        Called when the Finish button is clicked.

NextButtonClick:          Called when the Next button is clicked.

PreviousButtonClick:      Called when the Previous button is clicked.

SideBarButtonClick:       Called when a sidebar button is clicked.

The WizardStep control supports the following properties:

AllowReturn:      prevent or allow a user to return to this step from a future step.

Name:             return the name of the WizardStep control.

StepType:         get or set the type of wizard step. 
                  Possible values are Auto, Complete, Finish, Start, and Step.

Title:            get or set the title of the WizardStep. 
                  The title is displayed in the wizard sidebar.

Wizard:           get the Wizard control containing the WizardStep.

The WizardStep also supports the following two events:

Activate:        Raised when a WizardStep becomes active.

Deactivate:      Raised when another WizardStep becomes active.

<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">

    protected void Wizard1_FinishButtonClick(object sender, WizardNavigationEventArgs e)
    {
        lblSSNResult.Text = txtSSN.Text;
        lblPhoneResult.Text = txtPhone.Text;
    }
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Show Wizard</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>

    <asp:Wizard
        id="Wizard1"
        HeaderText="Product Survey"
        OnFinishButtonClick="Wizard1_FinishButtonClick"
        CssClass="wizard"
        HeaderStyle-CssClass="header"
        SideBarStyle-CssClass="sideBar"
        StepStyle-CssClass="step"
        Runat="server">
        <WizardSteps>
        <asp:WizardStep ID="WizardStep1" Title="Introduction">
        Please complete our survey so that we can improve our
        products.
        </asp:WizardStep>
        <asp:WizardStep ID="WizardStep2" Title="Step 1">
        <asp:Label
            id="lblSSN"
            Text="Social Security Number:"
            AssociatedControlID="txtSSN"
            Runat="server" />
        <br />
        <asp:TextBox
            id="txtSSN"
            Runat="server" />
        </asp:WizardStep>
        <asp:WizardStep ID="WizardStep3" Title="Step 2" StepType="Finish">
        <asp:Label
            id="lblPhone"
            Text="Phone Number:"
            AssociatedControlID="txtPhone"
            Runat="server" />
        <br />
        <asp:TextBox
            id="txtPhone"
            Runat="server" />
        </asp:WizardStep>
        <asp:WizardStep ID="WizardStep4" Title="Summary" StepType="Complete">
        <h1>Summary</h1>
        Social Security Number:
        <asp:Label
            id="lblSSNResult"
            Runat="server" />
        <br /><br />
        Phone Number:
        <asp:Label
            id="lblPhoneResult"
            Runat="server" />
        </asp:WizardStep>
        </WizardSteps>
    </asp:Wizard>

    </div>
    </form>
</body>
</html>
3. 29. Wizard
3. 29. 1. Displaying a Wizard
3. 29. 2. A simple Wizard control (C#)
3. 29. 3. A simple Wizard control (VB)
3. 29. 4. Wizard and its steps (C#)
3. 29. 5. WizardStep
3. 29. 6. Custom wizard navigation
3. 29. 7. Custom wizard
3. 29. 8. Help Example Wizard
3. 29. 9. Wizard template
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.