Class instance problem

  • Thread starter Thread starter Daves
  • Start date Start date
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?
 
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.
 
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?
 
Back
Top