Click here to Skip to main content
15,891,607 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
code is

DataClassesDataContext datatbl = new DataClassesDataContext();



error is
The type or namespace name 'DataClassesDataContext' could not be found (are you missing a using directive or an assembly reference?)
Posted
Updated 4-Sep-14 3:02am
v2
Comments
[no name] 4-Sep-14 8:58am    
Well are you missing a using statement or assembly reference?
harshavardhan12345678 4-Sep-14 9:12am    
Again Getting same error
[no name] 4-Sep-14 11:08am    
I have seen this type of error if you have your project set to use the client profile target instead or the full framework. Try that.
harshavardhan12345678 4-Sep-14 9:16am    
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;

1 solution

You need to add the reference in the project.
Add > Reference> .NET > System.Data.Linq
 
Share this answer
 
Comments
harshavardhan12345678 4-Sep-14 9:12am    
Again getting same error
harshavardhan12345678 4-Sep-14 9:16am    
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
Duncan Edwards Jones 4-Sep-14 9:26am    
Is the System.Data.Linq DLL listed in the references dialog box?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900