Solved

NameSpace Error - class is not defined ?

Posted on 2004-09-20
5
278 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
Comment Utility
Hi,

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

Regards,
B..M
0
 
LVL 10

Expert Comment

by:123654789987
Comment Utility
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
Comment Utility
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
Comment Utility
Shouldn't there be:
Dim clients As New ClientsCollection ??

HTH
0
 

Author Comment

by:tariq_h
Comment Utility
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now