Thread: Wizard Step
View Single Post
  #1 (permalink)  
Old June 22nd, 2006, 07:22 AM
ziwez0 ziwez0 is offline
Authorized User
 
Join Date: Jul 2003
Location: , , .
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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:

Code(.aspx)

<asp:CreateUserWizard ID="CreateUserWizard1" runat="server" OnNextButtonClick="CreateUserWizard1_NextButtonCli ck">
        <WizardSteps>
            <asp:CreateUserWizardStep runat="server">
            </asp:CreateUserWizardStep>
            <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>
            <asp:WizardStep runat="server" Title="justlooking">
            </asp:WizardStep>
            <asp:CompleteWizardStep runat="server">
            </asp:CompleteWizardStep>
        </WizardSteps>
    </asp:CreateUserWizard>
</asp:Content>

Code (aspx.cs)

protected void CreateUserWizard1_NextButtonClick(object sender, WizardNavigationEventArgs e)
    {

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


            }

            else
            {
                Label1.Text = "Incorrect";
                CreateUserWizard1.ActiveStepIndex = 0;
            }
        }

please help!!