Wizard template : Wizard « ASP.net Controls « ASP.NET Tutorial






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

<!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" >
  <body>
    <form id="form1" 
      title="FinishNavigationTemplate Example" 
      runat="server">
      <asp:Wizard ID="Wizard1" 
        Runat="server" 
        ActiveStepIndex="0" 
        OnFinishButtonClick="OnFinishButtonClick">
        <WizardSteps>
          <asp:WizardStep ID="WizardStep1" Runat="server" 
            Title="Step 1">
            <!-- Put UI elements for Step 1 here. -->
            This is step one.
          </asp:WizardStep>
          <asp:WizardStep ID="WizardStep2" Runat="server" 
            Title="Step 2">
            <!-- Put UI elements for Step 2 here. -->
            This is step two.
          </asp:WizardStep>

        </WizardSteps>
        <FinishNavigationTemplate>
          Please enter your email address if you would like a confirmation email:
          <asp:TextBox ID="emailTextBox" 
            Runat="server">
          </asp:TextBox>
          &nbsp;<br />
          <asp:Button ID="Button1" CommandName="MovePrev"
              Runat="server" 
              Text="Previous" />
          <asp:Button ID="Button2" CommandName="MoveComplete" 
            Runat="server" 
            Text="Finish" />
        </FinishNavigationTemplate>
        <HeaderTemplate>
          <b>FinishNavigationTemplate Example</b>
        </HeaderTemplate>
      </asp:Wizard>
      <asp:Label ID="myLabel" runat="server"></asp:Label>
    </form>
  </body>
</html>

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 Temp : System.Web.UI.Page
{
    public void OnFinishButtonClick(object sender, EventArgs e)
    {
        myLabel.Text += "FinishButtonClick called<br/>"; 
    }
}








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