Assuming two aspx pages named Defaul1 and Default2 whith separate code behind
files. The corresponding class names are Defaul1 and Default2 respectively
and are in the same namespace (MyCompany.MyAp plication.UI).
In the "Page_Load" of Page2 class I have the following code
if ( Context.Handler is Page1 )
Page1 sourcePage = (Page1)Context. Handler;
Not allways but quite often during the build, I see the following error:
The type or namespace name 'Page1' could not be found (are you missing a
using directive or an assembly reference?)
The error message appears twise indicating the two code lines above.
There is no missing "using" because both classes are in the same namespace.
There is no missing assemply reference because both classes (pages) are in
the same web project.
The dev environment is VS 2005 and in the code behind files the classes are
declared as partial.
Any ideas what could be the problem?
Thanks 3 1413
you should not confuse namespaces with assemblies. namespace is just that, a
naming prefix. using a namespace just allows shortcuts in speciing names.
several assemblies (dlls) may use the same namespace, or one assembly may
have several namespaces. to reference a routine, you must specify the name,
but also must include the assembly containing the routine.
asp.net builds an assembly per page, so even though you use the same
namespace, you als need to add a reference to the page. a confusing facter
is that asp.net will compile serveral pages into the same dll if batching is
allowed. if you forgt the refernce and the pages end up in the same assembly
your ok. if they end up in different assemblies, then you're in trouble.
-- bruce (sqlwork.com)
"Argirop" <Ar*****@discus sions.microsoft .comwrote in message
news:8B******** *************** ***********@mic rosoft.com...
Assuming two aspx pages named Defaul1 and Default2 whith separate code
behind
files. The corresponding class names are Defaul1 and Default2 respectively
and are in the same namespace (MyCompany.MyAp plication.UI).
In the "Page_Load" of Page2 class I have the following code
if ( Context.Handler is Page1 )
Page1 sourcePage = (Page1)Context. Handler;
Not allways but quite often during the build, I see the following error:
The type or namespace name 'Page1' could not be found (are you missing a
using directive or an assembly reference?)
The error message appears twise indicating the two code lines above.
There is no missing "using" because both classes are in the same
namespace.
There is no missing assemply reference because both classes (pages) are in
the same web project.
The dev environment is VS 2005 and in the code behind files the classes
are
declared as partial.
Any ideas what could be the problem?
Thanks
And how can I add a reference to Default1 in Default2 ?
"bruce barker (sqlwork.com)" wrote:
you should not confuse namespaces with assemblies. namespace is just that, a
naming prefix. using a namespace just allows shortcuts in speciing names.
several assemblies (dlls) may use the same namespace, or one assembly may
have several namespaces. to reference a routine, you must specify the name,
but also must include the assembly containing the routine.
asp.net builds an assembly per page, so even though you use the same
namespace, you als need to add a reference to the page. a confusing facter
is that asp.net will compile serveral pages into the same dll if batching is
allowed. if you forgt the refernce and the pages end up in the same assembly
your ok. if they end up in different assemblies, then you're in trouble.
-- bruce (sqlwork.com)
"Argirop" <Ar*****@discus sions.microsoft .comwrote in message
news:8B******** *************** ***********@mic rosoft.com...
Assuming two aspx pages named Defaul1 and Default2 whith separate code
behind
files. The corresponding class names are Defaul1 and Default2 respectively
and are in the same namespace (MyCompany.MyAp plication.UI).
In the "Page_Load" of Page2 class I have the following code
if ( Context.Handler is Page1 )
Page1 sourcePage = (Page1)Context. Handler;
Not allways but quite often during the build, I see the following error:
The type or namespace name 'Page1' could not be found (are you missing a
using directive or an assembly reference?)
The error message appears twise indicating the two code lines above.
There is no missing "using" because both classes are in the same
namespace.
There is no missing assemply reference because both classes (pages) are in
the same web project.
The dev environment is VS 2005 and in the code behind files the classes
are
declared as partial.
Any ideas what could be the problem?
Thanks
Never mind, I found it.
Thanks a lot.
"Argirop" wrote:
And how can I add a reference to Default1 in Default2 ?
"bruce barker (sqlwork.com)" wrote:
you should not confuse namespaces with assemblies. namespace is just that, a
naming prefix. using a namespace just allows shortcuts in speciing names.
several assemblies (dlls) may use the same namespace, or one assembly may
have several namespaces. to reference a routine, you must specify the name,
but also must include the assembly containing the routine.
asp.net builds an assembly per page, so even though you use the same
namespace, you als need to add a reference to the page. a confusing facter
is that asp.net will compile serveral pages into the same dll if batching is
allowed. if you forgt the refernce and the pages end up in the same assembly
your ok. if they end up in different assemblies, then you're in trouble.
-- bruce (sqlwork.com)
"Argirop" <Ar*****@discus sions.microsoft .comwrote in message
news:8B******** *************** ***********@mic rosoft.com...
Assuming two aspx pages named Defaul1 and Default2 whith separate code
behind
files. The corresponding class names are Defaul1 and Default2 respectively
and are in the same namespace (MyCompany.MyAp plication.UI).
>
In the "Page_Load" of Page2 class I have the following code
>
if ( Context.Handler is Page1 )
Page1 sourcePage = (Page1)Context. Handler;
>
Not allways but quite often during the build, I see the following error:
>
The type or namespace name 'Page1' could not be found (are you missing a
using directive or an assembly reference?)
>
The error message appears twise indicating the two code lines above.
>
There is no missing "using" because both classes are in the same
namespace.
There is no missing assemply reference because both classes (pages) are in
the same web project.
>
The dev environment is VS 2005 and in the code behind files the classes
are
declared as partial.
>
Any ideas what could be the problem?
>
Thanks
>
>
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: P G |
last post by:
I hope this is on topic here. I have a problem compiling a simple
example of the use of boost::bind. Please take a look at the program
below.
/**************************************************************************/
#include <boost/function.hpp>
#include <boost/bind.hpp>
#include <boost/shared_ptr.hpp>
|
by: FireStarter |
last post by:
Guys, in the code that follows, why does the method F() still compile, even if
DBG is undefined? Inside method G(), the code inside <#if DBG> does not compile
(notice that I can write whatever I want in there, I will not receive a
compilation error). I do get such an error in F() - because of the garbage I
intentionally put there - but F() should not compile in the first place.
Am I misusing this attribute?!
#undef DBG
|
by: Tommy Vercetti |
last post by:
In Visual Studio .NET 2003, I do the following
1) File->New->Project
2) Visual C++ Projects->.NET->Windows Forms Application
3) Project->Add New Item->C++ File
4) Clear the new C++ file and replace with the two lines:
#include "stdafx.h"
#include <vcclr.h>
5) Build->Build Solution
I get the following compilation errors:
|
by: Jiho Han |
last post by:
I have an asp.net application that is running and I updated code behind
assemblies after I modified some internal logic.
Then I tried to view the page and got a very strange error, something like
the following:
Could not find file "C:\WINDOWS\TEMP\qoqdmvbc.dll".
I get errors like that in different places where I've updated assemblies.
They are all named with random alpha letters + .dll.
|
by: Jill Graham |
last post by:
Hi,
From time to time, I receive following error message when trying to access
my website.
When the error occurs, I have to recompile my dll until the error disappears
(this without changing anything in my code).
Where does this error come from ? What can I do to solve the problem ?
Compilation Error
Description: An error occurred during the compilation of a resource required
to service this request. Please review the following...
| |
by: Ricky K. Rasmussen |
last post by:
Hi NG,
When connecting to a local WebService one of our customers gets a very
strange exception:
"File or assembly name gaw9eaqv.dll, or one of its dependencies, was not
found."
The strange part is that the name of the assembly can vary, and has nothing
to do with the names of the assemblies used in neither the WebService or the
|
by: mwelsh1118 |
last post by:
Why doesn't C# allow incremental compilation like Java?
Specifically, in Java I can compile single .java files in isolation.
The resulting individual .class files can be grouped into .jar files.
In C#, there appears to be no analog. I have to compile all my .cs
files into a single .dll.
This has serious drawbacks in terms of compilation. With Eclipse, I
change a file and only that file is re-compiled. With Visual Studio, I
|
by: f0zzyNUE |
last post by:
hi everyone,
currently we are testing the performance our application (asp.net
based CMS) ... for that reason we wrote a "spider" that starts
webrequests for all relevant pages which results in filling the
pageoutputcache on server side.
so far so good. if we start one spider at once our application works
fine, but if we run more than one spider tool at the same time the
asp.net process works for a few minutes returning correct http...
|
by: =?Utf-8?B?UGF1bCBCdXp6YSwgb2xkc3RlciB1c2luZyBuZXcg |
last post by:
I recently implemented error processing on my .net website, where I send
myself an email from global.asax on an application error. In the last two
days I have gotten a "The file '/detail.aspx' does not exits" type
error--with two different file names. In both cases, I searched my entire
source for the '/detail.aspx' reference and it doesn't exist.
What could be causing this error? Text of error email I sent to myself
follows....
...
|
by: BSand0764 |
last post by:
I'm getting an error that I can't seem to resolve. When I compile the
Functor related logic in a test program, the files compile and execute
properly (see Listing #1).
However, when I incorporate the same logic within my simulation, the
class that implements the functor logic has problems compiling. I get
the following errors:
-- Building myTest.cpp --
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |