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

December 16th, 2008, 12:28 PM
|
|
Friend of Wrox
|
|
Join Date: Dec 2008
Posts: 119
Thanks: 26
Thanked 0 Times in 0 Posts
|
|
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..
|
|

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

December 16th, 2008, 02:43 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|
The Following User Says Thank You to Imar For This Useful Post:
|
|
|

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

December 16th, 2008, 03:33 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|

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

December 16th, 2008, 05:17 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|
 |