Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > BOOK: Beginning ASP.NET 4 : in C# and VB
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old May 28th, 2015, 03:42 AM
Authorized User
Points: 218, Level: 4
Points: 218, Level: 4 Points: 218, Level: 4 Points: 218, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2015
Posts: 46
Thanks: 1
Thanked 0 Times in 0 Posts
Default chapter 4 there is problem

the wizard tool to create easy-to use forms
the code dose not execute never
Reply With Quote
  #2 (permalink)  
Old May 28th, 2015, 06:42 AM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,948
Thanks: 79
Thanked 1,555 Times in 1,532 Posts
Default

Which exercise are you referring to? Can you provide (a lot) more information?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
  #3 (permalink)  
Old May 29th, 2015, 01:08 PM
Authorized User
Points: 218, Level: 4
Points: 218, Level: 4 Points: 218, Level: 4 Points: 218, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2015
Posts: 46
Thanks: 1
Thanked 0 Times in 0 Posts
Default

In chapter 4 magic with the wizard control
What is wizard_finshbutton
I cannot execute the codebehinde in VB
Reply With Quote
  #4 (permalink)  
Old May 30th, 2015, 11:20 AM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,948
Thanks: 79
Thanked 1,555 Times in 1,532 Posts
Default

Can you post the code for the ASPX and its code behind?

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
  #5 (permalink)  
Old May 31st, 2015, 03:20 AM
Authorized User
Points: 218, Level: 4
Points: 218, Level: 4 Points: 218, Level: 4 Points: 218, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2015
Posts: 46
Thanks: 1
Thanked 0 Times in 0 Posts
Default

HTML Code
Code:
<asp:Wizard ID="Wizard1" runat="server" Width="500px" ActiveStepIndex="0">
                <WizardSteps>
                    <asp:WizardStep runat="server" title="About You">
                        <asp:Label ID="Label1" runat="server" Text="Type your name"></asp:Label>
                        <asp:TextBox ID="YourName" runat="server"></asp:TextBox>
                    </asp:WizardStep>
                    <asp:WizardStep runat="server" title="Favorite language" StepType="Finish">
                        <asp:DropDownList ID="FavoriteLanguage" runat="server">
                            <asp:ListItem>C#</asp:ListItem>
                            <asp:ListItem>Visual basic</asp:ListItem>
                            <asp:ListItem>Css</asp:ListItem>
                        </asp:DropDownList>
                    </asp:WizardStep>
                    <asp:WizardStep runat="server" StepType="Complete" Title="Ready">
                        <asp:Label ID="Result" runat="server" Text="Label"></asp:Label>
                    </asp:WizardStep>
                </WizardSteps>
            </asp:Wizard>


And this is code behind
Code:
 Result.Text = "Your Name is" & YourName.Text
        Result.Text &= "<br /> Yore Favorite Language is"
        FavoriteLanguage.SelectedValue


Thank you for your response
Reply With Quote
  #6 (permalink)  
Old June 8th, 2015, 10:57 AM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,948
Thanks: 79
Thanked 1,555 Times in 1,532 Posts
Default

Can you post the *full* code for the Code Behind?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
  #7 (permalink)  
Old June 10th, 2015, 05:39 AM
Authorized User
Points: 218, Level: 4
Points: 218, Level: 4 Points: 218, Level: 4 Points: 218, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2015
Posts: 46
Thanks: 1
Thanked 0 Times in 0 Posts
Default

This is full code behind:
Code:
Protected Sub Wizard1_FinishButtonClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.WizardNavigationEventArgs) Handles Result.FinishButtonClick, Wizard1.FinishButtonClick
      
        Result.Text = "Your Name is" & YourName.Text
        Result.Text &= "<br /> Yore Favorite Language is"
        FavoriteLanguage.SelectedValue
There is two blue underlines in
FinishButtonClick ,and FavoriteLanguage.SelectedValue
Reply With Quote
  #8 (permalink)  
Old June 10th, 2015, 06:04 AM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,948
Thanks: 79
Thanked 1,555 Times in 1,532 Posts
Default

Hi again,

I can see two issues with your code:

1. This:

Handles Result.FinishButtonClick, Wizard1.FinishButtonClick

should be:

Handles Wizard1.FinishButtonClick

as the method only handle's the Wizard1's FinishButtonClick event.

2. You're missing an ampersand when concatenating the values. This:

Result.Text &= "<br /> Yore Favorite Language is"
FavoriteLanguage.SelectedValue

should be:

Result.Text &= "<br /> Yore Favorite Language is" &
FavoriteLanguage.SelectedValue

Hope this helps,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
  #9 (permalink)  
Old June 22nd, 2015, 06:29 AM
Authorized User
Points: 218, Level: 4
Points: 218, Level: 4 Points: 218, Level: 4 Points: 218, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2015
Posts: 46
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thanks a lot
now It work nicely
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 3 Problem timtatum BOOK: Professional ASP.NET Design Patterns 1 July 19th, 2012 09:47 PM
Having a problem in chapter 2 Okie BOOK: Beginning Access 2003 VBA 1 August 9th, 2007 10:30 AM
problem on Chapter 5 stzd8 BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 November 25th, 2006 06:10 PM
Chapter 5 Problem gogeo BOOK: Beginning Access 2003 VBA 1 October 10th, 2005 10:34 AM



All times are GMT -4. The time now is 08:30 PM.


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