Wizard.ActiveStepChanged Event

Note: This event is new in the .NET Framework version 2.0.

Occurs when the user switches to a new step in the control.

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)

'Declaration
Public Event ActiveStepChanged As EventHandler
'Usage
Dim instance As Wizard
Dim handler As EventHandler

AddHandler instance.ActiveStepChanged, handler

/** @event */
public void add_ActiveStepChanged (EventHandler value)

/** @event */
public void remove_ActiveStepChanged (EventHandler value)

JScript supports the use of events, but not the declaration of new ones.

The ActiveStepChanged event is raised when the current step that is displayed in the Wizard control changes. Use the ActiveStepChanged event to provide additional processing when the current step of the Wizard control changes.

For more information about handling events, see Consuming Events.

The following code example demonstrates how to use the ActiveStepChanged event to update the HeaderText property of the Wizard control.

<%@ Page Language="VB" %>

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

<script runat="server">
  
  Sub OnActiveStepChanged(ByVal sender As Object, ByVal e As System.EventArgs)
    
    ' Every time that the ActiveStep property changes, change the HeaderText to match it.
    Wizard1.HeaderText = "You are currently on " + Wizard1.ActiveStep.Title
    
  End Sub

</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
  <body>
      <form id="form1" runat="server">
        <asp:Wizard ID="Wizard1" 
          Runat="server" 
          OnActiveStepChanged="OnActiveStepChanged" 
          HeaderText="ActiveStepChanged Example">
          <WizardSteps>
            <asp:WizardStep ID="WizardStep1" Title="Step 1" 
              Runat="server">
            </asp:WizardStep>
            <asp:WizardStep ID="WizardStep2" Title="Step 2" 
              Runat="server">
            </asp:WizardStep>
          </WizardSteps>
        </asp:Wizard>
      </form>
  </body>
</html>

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show: