ComponentOne Wizard for ASP.NET WebForms
Task-Based Help / Changing the Selected Step
In This Topic
    Changing the Selected Step
    In This Topic

    The ActiveIndex property of a C1Wizard control can be used to determine which step will be selected when your project is run. The following topic shows you how to set this property in Design view, in Source view, and in code.

    In Design View

    Complete the following steps:

    1. Click C1Wizard's smart tag Description: D:\Whidbey\T211\Projects - ASP Wijmo\Wijmo_C1Wizard\Word Documents\CommonGraphics\SmartTag.png to open the C1Wizard Tasks menu and select Wizard.SmartTag.Designer.
      The C1Wizard Designer Form appears.
    2. Select C1Wizard from the treeview to reveal its list of properties.
    3. Locate the ActiveIndex property and set its value to "1".

      Note: Observe that the default value of the ActiveIndex property is 0. If you had kept this setting, your C1Wizard would have loaded with the first step, C1WizardStep1, selected.

    4. Press OK and then run the project. Observe that the second step, C1WizardStep2, is selected at run time.

    In Source View

    Add ActiveIndex="1" to the <cc1:C1Wizard> tag. The resulting markup should resemble the following:

    <cc1:C1Wizard ID="C1Wizard1" runat="server" ActiveIndex="1">
    

    In Code View

    To change the selected index, add the following code to the Page_Load event:

    To write code in Visual Basic

    Visual Basic
    Copy Code
    C1Wizard1.ActiveIndex = 1
    

    To write code in C#

    C#
    Copy Code
    C1Wizard1.ActiveIndex = 1; 
    

    Description: CheckThis topic illustrates the following:

    At run time, the second step in the series will be selected, such as in the following graphic: