 |
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 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
|
|
|
|
|

May 28th, 2015, 03:42 AM
|
|
Authorized User
|
|
Join Date: May 2015
Posts: 46
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
chapter 4 there is problem
the wizard tool to create easy-to use forms
the code dose not execute never
|
|

May 28th, 2015, 06:42 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Which exercise are you referring to? Can you provide (a lot) more information?
Imar
|
|

May 29th, 2015, 01:08 PM
|
|
Authorized User
|
|
Join Date: May 2015
Posts: 46
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
In chapter 4 magic with the wizard control
What is wizard_finshbutton
I cannot execute the codebehinde in VB
|
|

May 30th, 2015, 11:20 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Can you post the code for the ASPX and its code behind?
Cheers,
Imar
|
|

May 31st, 2015, 03:20 AM
|
|
Authorized User
|
|
Join Date: May 2015
Posts: 46
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
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
|
|

June 8th, 2015, 10:57 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Can you post the *full* code for the Code Behind?
Imar
|
|

June 10th, 2015, 05:39 AM
|
|
Authorized User
|
|
Join Date: May 2015
Posts: 46
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
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
|
|

June 10th, 2015, 06:04 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|

June 22nd, 2015, 06:29 AM
|
|
Authorized User
|
|
Join Date: May 2015
Posts: 46
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Thanks a lot
now It work nicely
|
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 07:10 PM |
| Chapter 5 Problem |
gogeo |
BOOK: Beginning Access 2003 VBA |
1 |
October 10th, 2005 10:34 AM |
|
 |
|