Reputation: 41
I have a a class called CUser. I'm tyring to call a function in this class in another aspx page I have. This is how Im calling it:
CUser Logic = new CUser();
DataList1.DataSource = Logic.GetAllDate();
DataList1.DataBind();
Im getting the following error The type or name space name 'CUser' couldnt be found. My CUser class is in appcode in a folder named BLL. Am i missing something?
Thanks,
Upvotes: 0
Views: 109
Reputation: 9113
Does it have the NameSpace?
If it has the namespace, you have to type like:
YourNameSpace.CUser Logic = new YourNameSpace.CUser();
Or, put using statement at the top like:
using YourNameSpace;
And, have you built your website? Sometimes, you need to recompile/build the website to reflect the latest changes.
Upvotes: 1
Reputation: 5903
If your class is in a folder it is likely that it is in another Namespace.
You have to include it into your file where your are using your CUser
class.
As an example: using MyApp.BLL;
Upvotes: 2