473,487 Members | 2,601 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Page namespaces in .NET 2.0

I am working on a web application project that I migrated from .NET 1.1. In
this application, I sometimes expose static constant strings from my
inherited page class that hold, for example, some human readable text that I
want to display in a second page that will display the text and allow the
user to link to the first one. In .NET 2.0, it seems that I cannot use this
technique because other pages do not appear within my namespace any more...
so far, only classes I create in App_Data seem to be accessible from within
my page codebehind. Is this the case--that I can no longer access a page
class from within another page class? Also, this also seems to be the case
with User Controls... how useful are User Controls if I cannot access the
class from the page class that contains them?

Not quite getting it,
Michael Carr
Nov 19 '05 #1
2 984
I just discovered the @Reference directive and it seems to be helping...
except circular reference problems are going to drive me nuts now. So
@Reference is a basically a return to old-fashioned include files with their
all their circular reference problems, eh? Looks like I'm going to be up
late tonight...

Michael Carr

"Michael Carr" <mc***@umich.edu> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
In .NET 2.0, it seems that I cannot use this technique because other pages
do not appear within my namespace any more...

Nov 19 '05 #2
Check these out :

http://odetocode.com/Blogs/scott/arc...9/12/2186.aspx

http://west-wind.com/weblog/posts/3016.aspx

btw, you meant the App_Code directory, not App_Data.


Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"Michael Carr" <mc***@umich.edu> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
I am working on a web application project that I migrated from .NET 1.1. In this
application, I sometimes expose static constant strings from my inherited page class that
hold, for example, some human readable text that I want to display in a second page that
will display the text and allow the user to link to the first one. In .NET 2.0, it seems
that I cannot use this technique because other pages do not appear within my namespace
any more... so far, only classes I create in App_Data seem to be accessible from within
my page codebehind. Is this the case--that I can no longer access a page class from
within another page class? Also, this also seems to be the case with User Controls... how
useful are User Controls if I cannot access the class from the page class that contains
them?

Not quite getting it,
Michael Carr

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
3007
by: Steven Bethard | last post by:
In the "empty classes as c structs?" thread, we've been talking in some detail about my proposed "generic objects" PEP. Based on a number of suggestions, I'm thinking more and more that instead of...
24
3466
by: Marcin Vorbrodt | last post by:
Here is an example of my code: //Header file #include <vector> using std::vector; namespace Revelation { // class definitions, etc... // class members are of type std::vector }
3
2303
by: Jim Heavey | last post by:
Trying to get the hang of Namespaces. I have primarly developed in VB and am transitioning to C# and the .Net Environment. I have worked a bit with Java as well in school about a year or so ago....
5
1310
by: Welman Jordan | last post by:
I have developed several assemblies for my own site. They are in different namespaces, e.g. MySite.Web; MySite.Web.UI; MySite.Web.UI.HtmlControls; MySite.Web.UI.WebControls; I would like...
1
1676
by: Horace | last post by:
Hello Does anyone know how to remove (or make more general) both the Imports clause (in a class .vb file) and the Page directive (specifically the Inherits clause in a web page .aspx file). ...
21
2296
by: Rob Nicholson | last post by:
Why doesn't try..catch work on my asp.net page? Try Dim n As Integer = 10 n = n / 0 Catch ex As Exception ' ignore error End Try When I single step over the n=n/0 line, it goes straight to...
7
9317
by: VK | last post by:
Is it possible to include SVG object right onto HTML page in Firefox 1.5? (I mean native SVG, not SVG plugin) .... <svg> .... </svg> All samples on mozilla.org are either stay-alone .svg...
1
1495
by: javatopia | last post by:
Hello! I have a web page named "ChangePassword.aspx", which works just wonderful on my developer machine. When I deploy it to the server, though, I get: Compiler Error Message: CS0030: Cannot...
3
3533
by: Greg Collins [Microsoft MVP] | last post by:
Okay, this is driving me nuts now. I spent all last night researching newsgroup postings, web articles, etc. Running multiple sites off the same shared hosting service, I want to be able to...
12
2423
by: =?Utf-8?B?ZGdvdw==?= | last post by:
I designed a "contact_us" page in visual web developer 2005 express along with EW2 after viewing tutorials on asp.net's help page. Features work like they should, but I cannot figure out how to...
0
6967
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...
0
7137
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
5442
agi2029
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,...
1
4874
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4565
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1381
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 ...
1
600
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
267
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.