p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   ASP.NET 2.0 Professional (http://p2p.wrox.com/forumdisplay.php?f=215)
-   -   Wizard Step (http://p2p.wrox.com/showthread.php?t=44346)

ziwez0 June 22nd, 2006 07:22 AM

Wizard Step
I seem to having difficulty with Chapter 6 (6-18 : 6-19)
ive modified it to fit to what i need it for.
I want my users to enter a pin before they can complete creating account, if they enter the pin incorrect then i want them to go no futher, but at the mo it allows them to move onto the next step:


<asp:CreateUserWizard ID="CreateUserWizard1" runat="server" OnNextButtonClick="CreateUserWizard1_NextButtonCli ck">
            <asp:CreateUserWizardStep runat="server">
            <asp:WizardStep runat="server" Title="VerifyPin">
                <asp:TextBox ID="TextBox1" runat="server" Width="92px"></asp:TextBox>
                <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
            <asp:WizardStep runat="server" Title="justlooking">
            <asp:CompleteWizardStep runat="server">

Code (aspx.cs)

protected void CreateUserWizard1_NextButtonClick(object sender, WizardNavigationEventArgs e)

        if (e.NextStepIndex == 1)
            if (TextBox1.Text == "123456")
                CreateUserWizard1.ActiveStepIndex = 2;


                Label1.Text = "Incorrect";
                CreateUserWizard1.ActiveStepIndex = 0;

please help!!

ziwez0 June 22nd, 2006 08:25 AM

Opps sorted it

should be

if (e.NextStepIndex == 2)

All times are GMT -4. The time now is 05:28 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.