Helllo, I get this error:
CS0246: The type or namespace name 'DataClasses1DataContext' could not be found (are you missing a using directive or an assembly reference?)
For this .aspx file:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class WebApplication1_admin_Places : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
DataClasses1DataContext db = new DataClasses1DataContext();
var query = (from m in db.Places orderby m.Name select m);
PlacesList.DataSource = query;
PlacesList.DataBind();
}
}
The thing is, on / folder I can access DB, but on /admin folder i get this error.
What am I doing wrong?
EDIT
CS0012: The type 'System.Data.Linq.DataContext' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
What does that mean?