Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 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 December 16th, 2008, 12:28 PM
Friend of Wrox
 
Join Date: Dec 2008
Posts: 119
Thanks: 26
Thanked 0 Times in 0 Posts
Default chapter 4, problem with step wizard

Hi Imar:

On page 120, I've followed all the instructions so far. I just created the lstFavoriteLanguage, added the C#, Visual Basic and CSS by "editing items" on the smart tag. But when I look in the source code, they aren't there.

I had no problem with this happening in the ListControls example from page 113 where it shows the list items added in source as so:

<asp:DropDownList ID="DropDownList1" runat="server">
<asp:ListItem>C#</asp:ListItem>
<asp:ListItem>Visual Basic</asp:ListItem>
<asp:ListItem>CSS</asp:ListItem>
</asp:DropDownList>

Mine added fine and source code looked like the books.

But on the Container control, after adding the three items to the list, this is what I have in source view:

<asp:WizardStep runat="server" title="Favorite Language" StepType="Finish">
<asp:DropDownList ID="lstFavoriteLanguage" runat="server">

</asp:DropDownList>
</asp:WizardStep>

I also noticed that it doesn't show step1, step2, etc like show on your page which shows "WizardStep2".
I clicked on About you, right clicked add/remove wizard steps, and set about you to auto under step type and titled it About You, did the same for the other two steps, instructed, Favorite Language was set to "finish" and Ready was set to "complete".

This is what now shows up in my source view:

<body>
<form id="form1" runat="server">
<div>

<asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack="True"
oncheckedchanged="CheckBox1_CheckedChanged" Text="Show Panel" />
<asp:Panel ID="Panel1" runat="server" Visible="False">

<asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="0" Width="500px">
<WizardSteps>
<asp:WizardStep runat="server" title="About You">
<asp:Label ID="Label1" runat="server" Text="Type your name"></asp:Label>
<asp:TextBox ID="txtName" runat="server"></asp:TextBox>
</asp:WizardStep>
<asp:WizardStep runat="server" title="Favorite Language" StepType="Finish">
<asp:DropDownList ID="lstFavoriteLanguage" runat="server">

</asp:DropDownList>
</asp:WizardStep>
<asp:WizardStep runat="server" StepType="Complete" Title="Ready">
</asp:WizardStep>
</WizardSteps>
</asp:Wizard>
</asp:Panel>

</div>
</form>
</body>

edit:
I just deleted the containers file and redid it and still same thing. I know the book states you can copy and paste the tags from the previous exercise rather than adding them one by one, but shouldn't it work without pasting?

Last edited by Rachel; December 16th, 2008 at 02:01 PM..
 
Old December 16th, 2008, 02:22 PM
Friend of Wrox
 
Join Date: Dec 2008
Posts: 119
Thanks: 26
Thanked 0 Times in 0 Posts
Default

I got it working in the browser correctly. But I had to copy and paste to make it work: I pasted

<asp:ListItem>C#</asp:ListItem>
<asp:ListItem>Visual Basic</asp:ListItem>
<asp:ListItem>CSS</asp:ListItem>

from the previous try out from page 113-114, because even when i used the edit box and added the three languages manually using add/remove wizard steps, the tags above didn't show up in mark up view when I did the steps on page 120.

Can't figure out what I was doing wrong.

Rae
 
Old December 16th, 2008, 02:43 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Quote:
because even when i used the edit box and added the three languages manually using add/remove wizard steps,
You shouldn't add the languages as *WizardSteps*. Inside the right WizardStep, you should add items to the DropDownList control using its item editor dialog...

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!
The Following User Says Thank You to Imar For This Useful Post:
Rachel (December 16th, 2008)
 
Old December 16th, 2008, 02:59 PM
Friend of Wrox
 
Join Date: Dec 2008
Posts: 119
Thanks: 26
Thanked 0 Times in 0 Posts
Default

You mean right click on the dropdownlist and choose edit items and add them like that? And then that code will show up in the mark up view?
If so, then I'll just take your word for it rather than redoing it since its working now and I want to keep moving.

Thanks
Rachel
 
Old December 16th, 2008, 03:33 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Yes, exactly. That's how you add items to the DropDownList using the Design View.

If I were you, I'd spend a second on trying it out so you know what to do in the future. You can easily add a fourth item like JavaScript....

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!
 
Old December 16th, 2008, 04:44 PM
Friend of Wrox
 
Join Date: Dec 2008
Posts: 119
Thanks: 26
Thanked 0 Times in 0 Posts
Default

I must have done it that way on the try it out on page 113 since I had no problem there. I see now when I click on that list control how to do it.

I think what happened is that I kept clicking on the wrong control and bringing up the smart tag for the wizard instead of the list control, then adding steps instead of items and the box looks identical.

Thanks again Imar. I hope I don't have to bother you again.

Rachel
 
Old December 16th, 2008, 05:17 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Yeah, it must have been something like that.

Anyway, glad it's working now. And no worries about posting here: that's what these forums are all about...

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!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 3 - Try it out, step 5 vsches BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 2 March 17th, 2009 11:00 PM
Wizard Finish Step Approach AspNetGuy ASP.NET 3.5 Basics 0 June 17th, 2008 05:15 PM
user controls not sustaining on a wizard step!! kaliaparijat ASP.NET 2.0 Professional 1 June 6th, 2008 12:41 PM
Wizard Step ziwez0 ASP.NET 2.0 Professional 1 June 22nd, 2006 08:25 AM





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