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: Professional ASP.NET 4 : in C# and VB
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Professional ASP.NET 4 in C# and VB by Bill Evjen, Scott Hanselman, Devin Rader; ISBN: 9780470502204
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET 4 : in C# and VB 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
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old September 13th, 2013, 07:46 PM
Authorized User
Points: 203, Level: 4
Points: 203, Level: 4 Points: 203, Level: 4 Points: 203, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2012
Location: Mesquite Texas
Posts: 45
Thanks: 11
Thanked 0 Times in 0 Posts
Default CH 30-15: Could not load type 'NorthwindDataContext'.

Ch30-15 Listing: Dynamic Data Manager example
(Built on top of 30-8)

Error Message: Could not load type 'NorthwindDataContext'.

It Builds successfully/ No errors; 30-8,..12,13,14 work fine using the same Northwind.dbml file.

The Northwind.dbml properties show name= "NorthwindDataContext" ; but Content & entity namespace Are blank.
Properties header = NorthwindDataContext DataContext

The global.aspx file use "NorthwindDataContext" as in 30-9 listing.

Northwind.dbml file IS not in an App_Code folder, just in root...

Anybody got any Ideas ?

Thanks, Edgy

Code:
<body>
    <form id="form1" runat="server">
    <div>
        <asp:GridView ID="GridView1" runat="server" AllowPaging= "True" 
         AutoGenerateColumns = "True" DataKeyNames="CustomerID" DataSourceID="LinqDataSource1" >
        </asp:GridView>

        <asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="NorthwindDataContext"
        EntityTypeName= "" OrderBy="CompanyName" TableName="Customers" >
        </asp:LinqDataSource>

        <asp:DynamicDataManager ID="DynamicDataManager1" runat="server">
        <DataControls>
            <asp:DataControlReference ControlID="GridView1" />
         </DataControls>
        </asp:DynamicDataManager>
    </div>
    </form>
</body>
Reply With Quote
  #2 (permalink)  
Old September 14th, 2013, 06:50 AM
Imar's Avatar
Wrox Author
Points: 71,078, Level: 100
Points: 71,078, Level: 100 Points: 71,078, Level: 100 Points: 71,078, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,931
Thanks: 79
Thanked 1,553 Times in 1,530 Posts
Default

Is this a web site project and not an web application project? If so, the dbml file must be in App_Code.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
Reply


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
Ch. 15 - Exercise 2 Tulsi BOOK: Beginning ASP.NET 4 : in C# and VB 2 January 31st, 2013 11:30 AM
Ch 13 - Conversion from type 'DBNull' to type 'Boolean' is not valid. leeWozyWarren BOOK: Beginning ASP.NET 4 : in C# and VB 2 November 22nd, 2011 02:36 PM
CH 15 First Try It Out DataGridView hlakam BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 0 January 6th, 2011 12:21 PM
CH.15 NEED HELP stacy BOOK: Beginning ASP 3.0 1 January 21st, 2004 02:37 AM



All times are GMT -4. The time now is 06:24 PM.


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