title: Linq-to-SQL datacontext not generating an object
body: <p>I am working in a .NET 2.0, recently upgraded to .NET 3.5 environment (VS2008, VB.NET) on an existing ASP.NET website project. I am able to generate a Linq-to-SQL Class (also called a DataContext?) in the App Code folder, drag over tables from an active connection, and save it. Let's call it MyDB. When I go to the code-behind file for my page and try to declare an object of "MyDBDataContext" it is not in the intellisense, indicating that it is not accessible.
  I checked the references, and that has to be set correctly because I made the .dbml file.
  I made a new test windows app project and it behaved exactly as expected, and I could follow <a href="http://weblogs.asp.net/scottgu/archive/2007/05/19/using-linq-to-sql-part-1.aspx" rel="nofollow noreferrer">this blog</a> without a problem.</p>
  
  <p>Is there something inherent to web projects that doesn't allow for these auto-generated objects to be usable? Is App Code the right place to declare it?</p>
  
  <p>If you can't tell from the above, I am new to the industry and really new to LINQ.</p>
  
  <p>thanks for your help.</p>