Wizard.MoveTo メソッドとは? わかりやすく解説

Wizard.MoveTo メソッド

メモ : このメソッドは、.NET Framework version 2.0新しく追加されたものです。

指定した WizardStepBase派生オブジェクトを、Wizard コントロールActiveStep プロパティの値として設定します

名前空間: System.Web.UI.WebControls
アセンブリ: System.Web (system.web.dll 内)
構文構文

Public Sub MoveTo ( _
    wizardStep As WizardStepBase _
)
Dim instance As Wizard
Dim wizardStep As WizardStepBase

instance.MoveTo(wizardStep)
public void MoveTo (
    WizardStepBase wizardStep
)
public:
void MoveTo (
    WizardStepBase^ wizardStep
)
public void MoveTo (
    WizardStepBase wizardStep
)
public function MoveTo (
    wizardStep : WizardStepBase
)

パラメータ

wizardStep

ActiveStep として設定する WizardStepBase の派生オブジェクト

例外例外
例外種類条件

ArgumentNullException

渡されWizardStepBase派生オブジェクトの値が null 参照 (Visual Basic では Nothing) です。

ArgumentException

渡され関連する WizardStepBase派生オブジェクトの ActiveStepIndex が -1 です。

解説解説
使用例使用例

MoveTo メソッド使用してWizard コントロールActiveStep プロパティ制御する方法次のコード例示しますCheckBox1.Checked の値が true場合ActiveStep プロパティWizard1.Step3設定されます。それ以外場合ActiveStep プロパティWizard1.Step2設定されます。

<%@ 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 whether the
 
    ' CheckBox1 check box is selected.  If it is, skip to the Step3
 step.
    If Wizard1.ActiveStepIndex = Wizard1.WizardSteps.IndexOf(Me.WizardStep2)
 Then
    
      If (Me.CheckBox1.Checked) Then
        Wizard1.MoveTo(Me.WizardStep3)
      Else
        Wizard1.MoveTo(Me.WizardStep2)
      End If
    
    End If

  End Sub
  
</script>

<html  >
  <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="Select this check box 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>MoveTo Example</b>
        </HeaderTemplate>
      </asp:Wizard>
    </form>
  </body>
</html>
<%@ 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 whether
 the 
    // CheckBox1 check box is selected.  If it is, skip to the Step3
 step. 
    if (Wizard1.ActiveStepIndex == Wizard1.WizardSteps.IndexOf(this.WizardStep2))
    {
      if (this.CheckBox1.Checked)
      {
        Wizard1.MoveTo(this.WizardStep3);
      }
      else
      {
        Wizard1.MoveTo(this.WizardStep2);
      }
    }
  }
  
</script>

<html  >
  <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="Select this check box 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>MoveTo Example</b>
        </HeaderTemplate>
      </asp:Wizard>
    </form>
  </body>
</html>
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からWizard.MoveTo メソッドを検索した結果を表示しています。
Weblioに収録されているすべての辞書からWizard.MoveTo メソッドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からWizard.MoveTo メソッド を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

Wizard.MoveTo メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



Wizard.MoveTo メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS