Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > BOOK: Professional ASP.NET 4 : in C# and VB
|
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 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 September 13th, 2013, 07:46 PM
Authorized User
 
Join Date: Jun 2012
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>
 
Old September 14th, 2013, 06:50 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 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!





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 12:30 PM
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 03: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 01:21 PM
CH.15 NEED HELP stacy BOOK: Beginning ASP 3.0 1 January 21st, 2004 03:37 AM





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