Class instance problem

D

Daves

I am using the 2.0 App_Code folder to have a common, global class for every
aspx page to access and use. I need to have a common "MainTitle" string
variable to read/write and which finally the MasterPage PreRender event code
parses to decide if a page title should be rendered.
While I can instantiate this class in the MasterPage code it means that the
instance that the aspx pages access is a different one and so they are not
talking to each other. My question is - how can I have a common access to
this class instance, both from MasterPage and aspx pages?
 
C

carion1

Session unless you want to dynamically re-write the code for the class in
the app_code folder. I could be wrong as I have limited exp with 2005.
 
D

Daves

if I understand this correctly the only way to do this would be to have the
properties static? If so, wouldn't that be prone to errors since every user
session could change the property values, before the page cycle has finished
running?
 

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

Top