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
Michael Carr - 31 Oct 2005 06:19 GMT
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
> In .NET 2.0, it seems that I cannot use this technique because other pages
> do not appear within my namespace any more...
Juan T. Llibre - 31 Oct 2005 13:39 GMT
Check these out :
http://odetocode.com/Blogs/scott/archive/2005/09/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/
======================================
>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
[quoted text clipped - 9 lines]
> Not quite getting it,
> Michael Carr