p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: ASP.NET 4 24-Hour Trainer (http://p2p.wrox.com/forumdisplay.php?f=591)
-   -   Chapter 19a code does not work (http://p2p.wrox.com/showthread.php?t=80718)

poduska August 28th, 2010 11:41 PM

Chapter 19a code does not work

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.


Toi B Wright August 29th, 2010 10:19 AM


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.


Toi B Wright

poduska August 29th, 2010 11:27 PM

All works fine
[:I] [:o]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.

Cybermaniac January 17th, 2011 02:11 PM

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.



Toi B Wright January 17th, 2011 03:22 PM

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.

All times are GMT -4. The time now is 08:59 PM.

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