Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET 4 24-Hour Trainer
This is the forum to discuss the Wrox book ASP.NET 4 24-Hour Trainer by Toi B. Wright; ISBN: 978-0-470-59691-3
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 4 24-Hour Trainer 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
  #1 (permalink)  
Old August 28th, 2010, 11:41 PM
Registered User
 
Join Date: Aug 2010
Posts: 4
Thanks: 2
Thanked 0 Times in 0 Posts
Default Chapter 19a code does not work

Hello,

All code has worked fine up to this point and this book has been a good "Quick immersion" into ASP.net.

I don't mean to discourage anyone from the book, if someone can confirm this chapters code works I will assume it is just my system configuration.

I am not sure the code for Chapter 19a is functional.
I have attempted it 4 times, followed along with the video and even copied from the Book solutions the DataLayer folder and Lession19a folder and I still receive this error.

C:\Documents and Settings\Dad\My Documents\ASPNETTrainer\Lesson19a\Lesson19a\Catego ry.aspx.cs(14,13): error CS0246: The type or namespace name 'DataLayer' could not be found (are you missing a using directive or an assembly reference?)

This appears twice in the output.

I assumed if I copied over the folders from the web site (Datalayer and Lession19a) I would have exactly what you do in the video but is there something else I should try?

I noticed on page 304 #18 you add "if (!Page.IsPostBack) and the DataLayer line of code we add to the Page_Load on page 303 #13 is missing but I receive errors if I delete the line.

All code has worked fine up to this point.

Thank

Last edited by poduska; August 29th, 2010 at 07:45 AM.. Reason: Clarification
  #2 (permalink)  
Old August 29th, 2010, 10:19 AM
Authorized User
Points: 66, Level: 1
Points: 66, Level: 1 Points: 66, Level: 1 Points: 66, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2010
Location: Dallas, TX
Posts: 18
Thanks: 0
Thanked 1 Time in 1 Post
Default DataLayer.dll

Hello,

The DataLayer namespace is in the DataLayer.dll. Have you tried using the DataLayer.dll that is in the solution? Please see Step 8 of the Step-by-Step guide for more information.

Regards,


Toi B Wright
The Following User Says Thank You to Toi B Wright For This Useful Post:
poduska (August 29th, 2010)
  #3 (permalink)  
Old August 29th, 2010, 11:27 PM
Registered User
 
Join Date: Aug 2010
Posts: 4
Thanks: 2
Thanked 0 Times in 0 Posts
Thumbs up All works fine

Ok, I was attempting to save all the work in the My Documents and no matter how careful I was to change all the paths the code never worked. I even updated the connection string. When I redid Chapter 18 and Chapter 19 into C:\ASPNETTrainer\ everything works perfect. Perhaps the code did not like the blank spaces in the path when using "My Documents".

At least I can continue on to the rest of book.

Great first immersion into ASP.net. Definitely a good purchase.
  #4 (permalink)  
Old January 17th, 2011, 02:11 PM
Registered User
 
Join Date: Jul 2010
Location: Medford, Massachusetts
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Code in 19a

I'm having the same problem with the code in 19a as the other user. I am referencing the correct DataLayer.dll, but the code still won't work.

Thanks.

cybermaniac
  #5 (permalink)  
Old January 17th, 2011, 03:22 PM
Authorized User
Points: 66, Level: 1
Points: 66, Level: 1 Points: 66, Level: 1 Points: 66, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2010
Location: Dallas, TX
Posts: 18
Thanks: 0
Thanked 1 Time in 1 Post
Default Problem with 19a

The ConnectionString.txt that is provided makes a couple of assumptions. First is assumes that you are using SQLExpress and second that SQL Express is running. If you are using a named instance for SQL Server, please update the ConnectionString.txt information with the correct information and verify that SQL Server is running.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot Get PHP Code Example in Chapter 1 to Work rhieger Beginning PHP 5 July 27th, 2008 11:16 AM





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