Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > BOOK: ASP.NET 4 24-Hour Trainer
Password Reminder
Register
Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old August 29th, 2010, 12:41 AM
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 08:45 AM. Reason: Clarification
  #2 (permalink)  
Old August 29th, 2010, 11: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 30th, 2010)
  #3 (permalink)  
Old August 30th, 2010, 12:27 AM
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.
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 12:16 PM



All times are GMT -4. The time now is 09:47 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.