Wizard.ActiveStep 속성

정의

사용자에게 현재 표시된 WizardSteps 컬렉션의 단계를 가져옵니다.

public:
 property System::Web::UI::WebControls::WizardStepBase ^ ActiveStep { System::Web::UI::WebControls::WizardStepBase ^ get(); };
[System.ComponentModel.Browsable(false)]
public System.Web.UI.WebControls.WizardStepBase ActiveStep { get; }
[<System.ComponentModel.Browsable(false)>]
member this.ActiveStep : System.Web.UI.WebControls.WizardStepBase
Public ReadOnly Property ActiveStep As WizardStepBase

속성 값

WizardStepBase

사용자에게 현재 표시된 WizardStepBase입니다.

특성

예외

해당하는 ActiveStepIndex가 -1보다 작거나 WizardStepBaseWizard 개체 수보다 큰 경우

예제

다음 코드 예제에서는 속성을 사용 하 여 컨트롤의 ActiveStep Wizard 다음 ActiveStep 속성으로 설정할 단계를 결정 하는 방법을 보여 줍니다. If the value of CheckBox1.Checked is true, the ActiveStep property is set to Wizard1.Step3; otherwise, the ActiveStep property is set to Wizard1.Step2.

<%@ 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">

  void OnActiveStepChanged(object sender, EventArgs e)
  {
    // If the ActiveStep is changing to Step2 check to see if the 
    // CheckBox1 CheckBox is checked.  If it is then skip 
    // to the Step3 step.
    if (Wizard1.ActiveStep == this.WizardStep2)
    {
      if (this.CheckBox1.Checked)
      {
        Wizard1.ActiveStepIndex = Wizard1.WizardSteps.IndexOf(this.WizardStep3);
      }
    }
  }
  
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
  <head runat="server">
    <title>ASP.NET Example</title>
</head>
<body>
      <form id="form1" runat="server">
        <asp:Wizard ID="Wizard1" 
          Runat="server"
          OnActiveStepChanged="OnActiveStepChanged">
          <WizardSteps>
            <asp:WizardStep ID="WizardStep1" 
              Title="Step 1" 
              Runat="server">
              <asp:CheckBox ID="CheckBox1" 
                Runat="Server" 
                Text="Check this checkbox to skip Step 2." />
                You are currently on Step 1.
            </asp:WizardStep>
            <asp:WizardStep ID="WizardStep2" 
              Title="Step 2" 
              Runat="server">
              You are currently on Step 2.
            </asp:WizardStep>
            <asp:WizardStep ID="WizardStep3" 
              Runat="server" 
              Title="Step 3">
              You are currently on Step 3.
            </asp:WizardStep>
          </WizardSteps>
          <HeaderTemplate>
            <b>ActiveStepIndex Example</b>
          </HeaderTemplate>
        </asp:Wizard>
      </form>
  </body>
</html>
<%@ 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 EventArgs)
    ' If the ActiveStep is changing to Step2 check to see if the 
    ' CheckBox1 CheckBox is checked.  If it is then skip 
    ' to the Step3 step.
    If Wizard1.ActiveStep.Equals(Me.WizardStep2) Then
      If (Me.CheckBox1.Checked) Then
        Wizard1.ActiveStepIndex = Wizard1.WizardSteps.IndexOf(Me.WizardStep3)
      End If
    End If
  End Sub
  
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
  <head runat="server">
    <title>ASP.NET Example</title>
</head>
<body>
      <form id="form1" runat="server">
        <asp:Wizard ID="Wizard1" 
          Runat="server"
          OnActiveStepChanged="OnActiveStepChanged">
          <WizardSteps>
            <asp:WizardStep ID="WizardStep1" 
              Title="Step 1" 
              Runat="server">
              <asp:CheckBox ID="CheckBox1" 
                Runat="Server" 
                Text="Check this checkbox to skip Step 2." />
                You are currently on Step 1.
            </asp:WizardStep>
            <asp:WizardStep ID="WizardStep2" 
              Title="Step 2" 
              Runat="server">
              You are currently on Step 2.
            </asp:WizardStep>
            <asp:WizardStep ID="WizardStep3" 
              Runat="server" 
              Title="Step 3">
              You are currently on Step 3.
            </asp:WizardStep>
          </WizardSteps>
          <HeaderTemplate>
            <b>ActiveStepIndex Example</b>
          </HeaderTemplate>
        </asp:Wizard>
      </form>
  </body>
</html>

설명

이 속성은 ActiveStep 현재 컨트롤에 표시되는 개체를 Wizard 반환 WizardStepBase 합니다. 이 속성은 ActiveStep 읽기 전용이지만 이 속성을 사용하여 ActiveStep 현재 WizardStepBase 개체의 속성에 액세스할 수 있습니다. 속성을 ActiveStepIndex 사용하여 동적으로 다른 WizardStepBase 개체로 변경 ActiveStep 합니다. 또는 메서드를 MoveTo 사용하여 속성을 동적으로 설정할 ActiveStep 수 있습니다.

적용 대상

추가 정보