propagating variable value through out web site pages.

  • Thread starter Thread starter Carlos
  • Start date Start date
C

Carlos

Hi again all,

this question probably has more to do with the .net language specification
(VB or C#), than with ASP .Net, but I am learning along the way, and
now I am faced with the need to make the value of a variable that I capture
in my start-up page, available in pages that the user will be navigating.
Being that the classes are defined in the same namespace, how do I decalre
a variable in the page that will be using the variable defined in the root
class. I know that I can make it derive from it, but I just want to know if
there is a better, and easier alternative.

Thanks again,

Carlos.
 
Carlos,

All class members except static (Shared in VB) disappear after the page is
built and rendered. Inheritance won't help. You need to put the veriable in
a persistant storage. Depending on the scope you need, it could be Session,
Application. Static variables have scope of application.

Eliyahu
 

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

Back
Top