Wrox Programmer Forums
|
BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9
This is the forum to discuss the Wrox book Professional ASP.NET 2.0 Special Edition by Bill Evjen, Scott Hanselman, Devin Rader, Farhan Muhammad, Srinivasa Sivakumar; ISBN: 9780470041789
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 21st, 2006, 06:05 AM
Authorized User
 
Join Date: Sep 2006
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default Listing 6-19

Hi again! in a case you also have not understood this one,here is the
fix.In the beginning I could not solve this problem :)
Listing 6-19 Applying logical checks on whether to show a step

As shown in the Book: use the NextButtonClick event from the Wizard control.
This is the place where you have to Put this event.
//---------------------------------------------------

this is listing 6-18

<asp:Wizard ID ="Wizard1" runat ="server" OnNextButtonClick ="Wizard1_NextButtonClick">
<WizardSteps>
        
            <asp:WizardStep ID ="WizardStep1" runat ="server" Title ="Provide Personal Info">
             Firt name:<br />
             <asp:TextBox ID ="fnameTextBox" runat ="server"></asp:TextBox><br />
             Last Name:<br />
             <asp:TextBox ID ="lnameTextBox" runat ="server"></asp:TextBox><br />
             Email:<br />
             <asp:TextBox ID ="emailTextBox" runat ="server"></asp:TextBox><br />
            </asp:WizardStep>
        
            <asp:WizardStep ID ="WizardStep2" runat ="server" Title ="Membership Information">
             Are you already member of a group?<br />
             <asp:RadioButton ID ="RadioButton1" runat ="server" Text ="Yes" GroupName ="Member" />
             <asp:RadioButton ID ="RadioButton2" runat ="server" Text ="No" GroupName ="Member" />
            </asp:WizardStep>
        
            <asp:WizardStep ID ="MemberStep" runat ="server"
             Title ="Provide Membership Number">
             Membership Number<br />
             <asp:TextBox ID ="mNumberTextBox" runat ="server"></asp:TextBox>
            </asp:WizardStep>
            
            <asp:WizardStep ID ="WizardStep3" runat ="server" Title ="Provided Information" StepType ="Complete" OnActivate ="WizardStep3_Activate">
             <asp:Label ID ="Label1" runat ="server"></asp:Label>
            </asp:WizardStep>

         </WizardSteps>
     </asp:Wizard>
//-----------------------------------------------------

Now ERRATA say's :Page 211 Delete line in Code Block.
Grey code block at top, next to last line:
What line!? There is no need to delete nothing!
all you have to do, is to keep the Original code as-is(listing6-19)+ add WizardStep3_Activate EVENT from previous listing(6-17)

<script runat="server">

void Wizard1_NextButtonClick(object sender, WizardNavigationEventArgs e)
    {
        if (e.NextStepIndex == 2)
        {
            if (RadioButton1.Checked == true)
            {
                Wizard1.ActiveStepIndex = 2;
            }
            else
            {
                Wizard1.ActiveStepIndex = 3;
            }

        }
    }
    //this is for the FINISH BUTTON to show our Results remember?(listing6-17)
    protected void WizardStep3_Activate(object sender, System.EventArgs e)
    {
        Label1.Text = "First name: " + fnameTextBox.Text.ToString() + "<br />" +
            "Last name: " + lnameTextBox.Text.ToString() + "<br />" +
            "Email: " + emailTextBox.Text.ToString();
    }

</script>
 
Old October 2nd, 2006, 08:15 AM
jminatel's Avatar
Wrox Staff
Points: 18,059, Level: 58
Points: 18,059, Level: 58 Points: 18,059, Level: 58 Points: 18,059, Level: 58
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2003
Posts: 1,906
Thanks: 62
Thanked 139 Times in 101 Posts
Default

I went ahead and just moved this post to the correct forum since it's discussing Professional ASP.NET 2.0. :)

Jim Minatel
Senior Acquisitions Editor
Wiley Technology Publishing
WROX Press
Blog: http://wroxblog.typepad.com/
Jim's Book of the week: No book this week - Donate to the Red Cross!





Similar Threads
Thread Thread Starter Forum Replies Last Post
AJAX Listing 19-4 not working! bibsoconner BOOK: Professional ASP.NET 3.5 : in C# and VB ISBN: 978-0-470-18757-9 1 October 14th, 2008 11:55 PM
Listing 8-10 and Listing 8-16. Asp.Net BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 1 February 6th, 2008 01:11 PM
DataReader error on Listing 12-19 cJeffreywang BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 0 January 3rd, 2008 12:36 PM
Chapter 19 johanyu BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 3 November 12th, 2007 10:50 AM
Chapter 19 johanyu BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 2 October 10th, 2004 11:30 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.