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 August 31st, 2006, 09:14 AM
Authorized User
 
Join Date: Jan 2006
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default Errata - Chapter 10, Page 377, C#

In step 8:
Code:
private void Page_PreRender(object sender, System.EventArgs e)
...is probably wrong. I say "probably" because I can't get this example to work (I'll leave that for another topic).

But based on the the files in the End\Chapter10\ folder, it looks like this should be:
Code:
protected void SqlDataSource1_PreRender(object sender, System.EventArgs e)
In addition, it looks like there's a missing step in the book. You apparently also have to duplicate step 8, but specify the Repeater control:
Code:
protected void Repeater1_PreRender(object sender, System.EventArgs e)
 
Old August 31st, 2006, 10:22 AM
Authorized User
 
Join Date: Jan 2006
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default

After doing more testing, it looks like both the End\Chapter10\NewsUserControls\ files and the steps in the book are wrong. Step 8 in the book is correct, but there's something missing in the previous steps. I've gotten the entire example to work, but I've lost track of the changes because it required a bunch of experiments with copying, pasting and re-typing between the Begin and End files.

Maybe the Wrox guys can sort this out...
 
Old September 26th, 2006, 04:20 AM
Registered User
 
Join Date: Sep 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to rieks
Default

Same thing happens to me. VWD says the problem is with the 'void' part. Has anyone found a way to make it work?

 
Old September 29th, 2006, 05:40 AM
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 there RobC, rieks,

There isn't a problem with step 8 per se. Having run through the example myself using the download for Chapter 10, it looks like the problem is that web.config has the wrong connection string in it. Here's my suggestion.

  • Take a fresh copy of the chapter10 download and open the begin\chapter10\newsusercontrol project.
  • Skip point 2 as the .ascx file has already been created.
  • Step 6 implies that the connection string in web.config should be called WroxUnited but the one in the download isn't. Open up web.config and replace the contents of the <connectionStrings> element with the following.

        <connectionStrings>
        <add name="WroxUnited"
         connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirector y|WroxUnited.mdf;Integrated Security=True;User Instance=True"
         providerName="System.Data.SqlClient" />
    </connectionStrings>
  • Follow the rest of the steps as in the book. You can use either the default.aspx already in the project or create newsdisplay.aspx for step 9.

I hope that helps. There's no need to create Repeater1_PreRender.

Dan Maharry
Read the feed at http://feeds.feedburner.com/dansarchive
 
Old September 29th, 2006, 08:38 AM
Authorized User
 
Join Date: Jan 2006
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Dan,
Quote:
quote:There isn't a problem with step 8 per se.
Right, I originally thought step 8 was incorrect because it didn't match up with the code in \End\Chapter10\NewsUserControl\.

However, it turned out that the End code is incorrect: changing the value of the ItemsToShow property of the NewsUserControl doesn't work. I did eventually get it work with the \Begin\ files.
 
Old October 3rd, 2006, 02:26 AM
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

Rob,

I'm hoping to get a new set of downloads and errata for chapters 7 and 8 done as soon as possible.
Sorry it took a while to reply

Dan

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





Similar Threads
Thread Thread Starter Forum Replies Last Post
Errata - Chapter 10, Page 378, C# RobC BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 August 31st, 2006 09:56 AM
Errata - Chapter 10, Page 376, C# RobC BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 August 31st, 2006 09:07 AM
Errata - Chapter 9, Page 336, C# RobC BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 1 August 30th, 2006 03:06 AM
Errata - Chapter 9, Page 299, C# RobC BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 1 August 30th, 2006 03:03 AM
Errata - Chapter 9, Page 296, C# RobC BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 1 August 30th, 2006 02:51 AM





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