Linq – Import Namespace System.Query


I am trying to load Linq on my .Net 3.5 enabled web server by adding the following to my .aspx page:

<%@ Import Namespace="System.Query" %>

However, this fails and tells me it cannot find the namespace.

The type or namespace name 'Query' does not exist in the namespace 'System'

I have also tried with no luck:

  • System.Data.Linq
  • System.Linq
  • System.Xml.Linq

I believe that .Net 3.5 is working because var hello = "Hello World" seems to work.

Can anyone help please?

PS: I just want to clarify that I don't use Visual Studio, I simply have a Text Editor and write my code directly into .aspx files.

Best Solution

I have version 2 selected in IIS and I

Well, surely that's your problem? Select 3.5.

Actually, here's the real info: