Home > DeveloperSection > Beginner > Wizard Control in ASP.Net

Wizard Control in ASP.Net


ASP.Net ASP.Net 
Ratings:
0 Comment(s)
 4673  View(s)
Rate this:

Wizard Control in ASP.Net

This control enables us to create a wizard based interface for a user. Typically a wizard interface will be used when we require a user to input a lot of data. Wizard enables us to take the data from the user in series of multiple steps. Wizard allows us only a serial navigation between steps i.e. in a tabbed interface a user can jump between tabs (if not controlled) but in a wizard the user can go either to the previous or the next step.

<asp:Wizard ID="Wizard1" runat="server">

<WizardSteps>

<asp:WizardStep runat="server" title="Step 1">

</asp:WizardStep>

<asp:WizardStep runat="server" title="Step 2">

</asp:WizardStep>

</WizardSteps>

</asp:Wizard>

Wizard Control in ASP.Net

WizardStep Properties -

·         Title - The descriptive name of the step. This name is used for the text of the links in the sidebar.

·         Allow Return - User can return on previous step. By selecting  AllowReturn=true.

Code:

<asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="0"

   onfinishbuttonclick="Wizard1_FinishButtonClick">

    <WizardSteps>

             <asp:WizardStep runat="server" StepType="Start" title="Step 1">

                    You Are in First Step<br />

                    <br />

                    <br />

                    Enter Your Name<br />

                    <asp:TextBox ID="TextBox5" runat="server"></asp:TextBox>

                    <br />

              </asp:WizardStep>

              <asp:WizardStep runat="server" title="Step 2">

                    YOU ARE IN SECOND STEP<br />

                    <br />

              ur email id<asp:TextBox ID="TextBox3"  runat="server"></asp:TextBox>

                    <br />

                    <br />

                </asp:WizardStep>

              <asp:WizardStep runat="server" StepType="Finish" Title="Step3">

                    You Are in Third Step<br />

                    <br />

                    <br />

                    Password<br />

                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>

                    <br />

                    confirm password<br />

                    <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>

                    <br />

             </asp:WizardStep>

        </WizardSteps>

        <HeaderTemplate>

                WIZARD EXAMPLE

         </HeaderTemplate>

</asp:Wizard>

<asp:Label ID="Label1" runat="server"></asp:Label>

 

protected void Wizard1_FinishButtonClick(object sender, WizardNavigationEventArgs e)

    {

        Label1.Text = "Thank You your registation is complete";

        Wizard1.Visible = false;

    }

 

Wizard Control in ASP.Net

 

Wizard Control in ASP.Net

Click next

 

Wizard Control in ASP.Net

Click next

Wizard Control in ASP.Net

Click Finish

Wizard Control in ASP.Net


Don't want to miss updates? Please click the below button!

Follow MindStick