Namespace not found in aspx but IS found in code behind

W

William Parker

I have a class library that I built which I have added a reference to using
the Add Reference option.

Within my C# webform1.aspx I get a compile error with the following line
stating that the type or namespace was found and asking if I'm missing a
reference:
<% MyNamespace.MyObj abc; %>

However if I place this same line within the webform1.aspx.cs (code behind
page), say in the Page_Load event then it WORKS FINE.
MyNamespace.MyObj abc;

So, what would be different that would cause the aspx to error out at
compile time when running the page for the first time, compared to
everything working perfectly if I do the same code from the code behind
page? All this of course is within the same project and I definately do
have a reference to the class library where MyNamespace.MyObj is defined.
In case it matters this is with Framework 1.0 and VS.NET 2002.

Thanks!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top