p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Professional ASP.NET 4 : in C# and VB (http://p2p.wrox.com/forumdisplay.php?f=554)
-   -   CH 30-15: Could not load type 'NorthwindDataContext'. (http://p2p.wrox.com/showthread.php?t=90973)

EDGY September 13th, 2013 07:46 PM

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


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

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

        <asp:DynamicDataManager ID="DynamicDataManager1" runat="server">
            <asp:DataControlReference ControlID="GridView1" />

Imar September 14th, 2013 06:50 AM

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



All times are GMT -4. The time now is 11:49 PM.

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