DataContext from dbml not shown in LinqDataSource connection

Using Visual Studio 2010 & ASP.NET 3.5 w/ SQL Server 2008.

I've created a Test.dbml with local tables in it, and then created an aspx page

I then added a LinqDataSource control to it. When I try to configure LinqDataSource's "Configure Data Source" wizard however, and click the "Show only DataContext objects" checkbox, the "Choose your context object" listbox is EMPTY!

Any idea on why the data context from the DBML isn't showing up?

Note: In the code behind (using VB.NET here), I did following as a test, and the datacontext is found (i.e. is valid)
Dim dc As New TestDataContext
cdakzAsked:
Who is Participating?
 
Bob LearnedCommented:
I haven't used LINQ-to-SQL with the LinqDataSource, so my first question would be, "Did you rebuild the solution before you tried that?".  Sometimes, tools use reflection to examine the assembly, and if it is not built, you won't get valid results.
0
 
cdakzAuthor Commented:
These are some web pages that I'm adding into a DotNetNuke website. I didn't open them as a Web Application project, as they don't really need to be included in DNN's builds. So I'm adding them as plain old simple Website files (i.e. no build involved).

I did a quick test previously to see if this would work, and it did (including the availablility of the data context).
0
 
Bob LearnedCommented:
I don't have any experience with DNN, so I have no idea what effect that could have on your problem.
0
 
cdakzAuthor Commented:
I created a new local installation of this website and then opened in VS 2010, and this time it saw the Data Context. So I suspect that the previous suggeston about rebuilding the solution might have worked.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.