Tuesday, May 26, 2015

what is wizard control in asp.net

The Wizard control is a complex control that is used to display a series of Wizard Step
controls to a user, one after the other, as part of a user input process.

The built-in navigation capabilities determine which buttons are displayed based on the
Step Type value. The Base Wizard Step class contains the Step Type property that can be set to
one of the following values:

Wizard Step Type. Auto
This renders navigation buttons based on the location of the set within the Wizard Steps collection property of the Wizard. This is the default.

Wizard Step Type. Complete 
This is the last step to appear. No navigation buttons are rendered.

Wizard Step Type .Finish 
This is the final data collection step; the Finish and Previous buttons are rendered for navigation.

Wizard Step Type. Start 
This is the first one to appear, and only the Next button is rendered.

Wizard Step Type. Step 
This is a step between the Start and the Finish steps.The Previous and Next buttons are rendered.


<asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="4" OnFinishButtonClick="Wizard1_FinishButtonClick" BorderColor="Black" BorderStyle="Solid">
                <WizardSteps>
                    <asp:WizardStep runat="server" Title="Step 1">
                        welcome to wizard control
                    </asp:WizardStep>
                    <asp:WizardStep runat="server" Title="Step 2">
                        Enter first name<br />
                        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                    </asp:WizardStep>
                    <asp:WizardStep runat="server" Title="Step 3">
                        Enter Last Name<br />
                        <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
                    </asp:WizardStep>
                    <asp:WizardStep runat="server" Title="Step 4">
                        Enter Hobbies<br />
                        <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
                    </asp:WizardStep>
                    <asp:WizardStep runat="server" Title="Step 5">
                        You are complite
                    </asp:WizardStep>
                </WizardSteps>
            </asp:Wizard>





    protected void Wizard1_FinishButtonClick(object sender, WizardNavigationEventArgs e)
    {
        Response.Write(TextBox1.Text);
    }

No comments:

Post a Comment