Solved

NameSpace Error - class is not defined ?

Posted on 2004-09-20
5
280 Views
Last Modified: 2007-12-19
Hi all,

Ive created my own Collection called ClientsCollection (inheriting ArrayList)  under the ASPNET.StarterKit.TimeTracker.BusinessLogicLayer namespace , ie I added the namespace ASPNET.StarterKit.TimeTracker.BusinessLogicLayer at the top of the page.

I also have a ClientList.aspx page where I have defined <%@ import Namespace="ASPNET.StarterKit.TimeTracker.BusinessLogicLayer" %> at the top of the page.

Yet i get an error "ClientsCollection is not defined" for the line
Dim clients as ClientsCollection

Why would i get this if I have defined the class within the namespace and have the appropriate import statement at the top of the ClientList.aspx page ?  

Im using web matrix, is there a place where I need to define which files get included in the compile ?

Any help would be appreciated.

Tariq H
0
Comment
Question by:tariq_h
5 Comments
 
LVL 28

Accepted Solution

by:
mmarinov earned 500 total points
ID: 12100048
Hi,

have you rebuild the ASPNET.StarterKit.TimeTracker.BusinessLogicLayer dll ?

Regards,
B..M
0
 
LVL 10

Expert Comment

by:123654789987
ID: 12100671
Try to use a fully qualified name at Dim clients as ASPNET.StarterKit.TimeTracker.BusinessLogicLayer.ClientsCollection.

This would tell if the namespace is being refered or not
0
 

Author Comment

by:tariq_h
ID: 12107263
I have tried the fully qualified name but that didnt work either.
How would you rebuild the dll ?  I havent found anyway to put compile options into web matrix .

TIA

Tariq H
0
 
LVL 3

Expert Comment

by:mAjKoL
ID: 12107976
Shouldn't there be:
Dim clients As New ClientsCollection ??

HTH
0
 

Author Comment

by:tariq_h
ID: 12120158
B..m :  That was the problem , what I didnt know and what should be stated in big black bold letters is that Web Matrix does NOT compile classes for you ! Ive read three ASP.NET books and none of them state this.
You also need to put the compiled dlls in the bin directory under the main folder of your project.

Thanks for your help all.

Tariq H
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question