Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Import Namespace System.Query

Tags:

asp.net

linq

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.

like image 739
GateKiller Avatar asked Dec 30 '22 11:12

GateKiller


1 Answers

I have version 2 selected in IIS and I

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

Actually, here's the real info:

http://www.hanselman.com/blog/HowToSetAnIISApplicationOrAppPoolToUseASPNET35RatherThan20.aspx

like image 157
Will Dean Avatar answered Jan 01 '23 23:01

Will Dean