Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8
This is the forum to discuss the Wrox book Beginning ASP.NET 2.0 by Chris Hart, John Kauffman, David Sussman, Chris Ullman; ISBN: 9780764588501
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 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 4th, 2006, 04:57 PM
Authorized User
 
Join Date: Jan 2006
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 13, Try It Out pp479+, C# - Not Working

First, I would be amazed if any reader was able to get this example working because it requires that you type hundreds of lines of code across multiple files before you can even begin testing the example out. Second, I think it would be helpful if someone at Wrox published the correct steps to get this working.

Here are a few errors:

On page 479, step 3 doesn't list all the "using" statements required for the code to work in Shopping.cs. The file in End\Chapter13\Shopping.cs does have the required using statements, but it also has this line, which is a little strange for C# book:
Code:
using Microsoft.VisualBasic;
Also starting on page 479, the CartItem class declares a property named _lineTotal. This property serves no purpose; its value is set in the constructor, but it's never used anywhere.

In the middle of page 482, this line:
Code:
_items(ItemIndex).Quantity += 1
Should be:
Code:
items(ItemIndex).Quantity += Quantity
 
Old October 24th, 2006, 12:13 PM
Registered User
 
Join Date: Oct 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I did get the example to work, but I had to correct a few things:
* The using statements that you mentioned above.
* Making sure that you do the exercise in chapter 11, to get the appropriate profile attributes setup correctly
* When all else fails, compare your code to the final code in WroxUnited




 
Old October 25th, 2006, 04:13 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 105
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to DanM
Default

Hi Rob,

Skafando has it pretty much spot on but I wanted to chip in two cents about typing in at least most of the code in Step 3. Visual Studio has a set of shortcut 'snippets' that you can jsut insert into text and make your life much easier. You should find the Code Snippet Manager under the Tools menu or by pressing Ctrl+K, Ctrl+B.

So to insert the snippet for a property, you'd type 'prop' or whatever the shortcut for the snippet is - see the manager for that - then TAB twice and all you have to do is fill in the blanks.

One other point is that if you were writing the page from scratch, you really would have to write at least that much code before you could start testing. Again, as skafando points, we do have the final shop code available for you to cut and paste if you don't fancy it, but I found at least that typing it in meant I learnt it better.

Dan

Dan Maharry
Read the feed at http://feeds.feedburner.com/dansarchive





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 13 bwoll BOOK: Beginning Access 2003 VBA 1 June 7th, 2007 03:57 PM
Should I go past chapter 13? bossman21 BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 4 July 24th, 2006 12:42 PM
Chapter 13 ElMorenito BOOK: Beginning ASP 3.0 0 January 14th, 2005 02:56 PM
ch 13 enum_options.php not working thurmma BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 3 January 27th, 2004 04:26 AM





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