The error::
The type or namespace name 'NorthwindTableAdapters' could not be found (are you missing a using directive or an assembly reference?)
I am following the tutorial below and doing exactly like it says
http://www.asp.net/data-access/tutorials/creating-a-data-access-layer-cs
but getting this error..tried everything to make it go away
- Added the line of code in my file "using NorthwindTableAdapters; "
- tried steps like the following ques's answers say
A few questions::
Is there supposed to be a NorthWindAdapter class coz I cant see one in the solution explorer
Also my DB's name is "myDB" so do I need to write "using myDBTableAdapters;" instead of "using NorthwindTableAdapters;" ?? I did try this but it didnt work
My code:-
Default.aspx
using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
AllProducts.aspx
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using NorthwindTableAdapters;
public partial class AllProducts : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
ProductsTableAdapter productsAdapter = new ProductsTableAdapter();
GridView1.DataSource = productsAdapter.GetProducts();
GridView1.DataBind();
}
}
Should I type xsd file's code here ??
what's wrong ?? Help!