I have a couple question. I have experience with a couple programming langagues but I am new to ASP.net.

I am trying to create a web Application in C#. My first questions has to do with layouts. I am trying to make it so that all requests go through one page ( Default.aspx). So anytime content needs to be updated it will refresh Default.aspx and the appropriate user controls will be displayed. I have learned that using Session variable is an option. I would like to know if anyone can recommend an alternative method.

I am also confused as of the life of an object. I would like to know if when i refresh Default.aspx the objects i created are still in memory and accesable? Is it diefferent when you transfer/ refresh to anothe page?

Votes + Comments
it didnt mean to be useful
9 Years
Discussion Span
Last Post by ryuslash

i dont have time to answer to your thread but what i can tell about "Life of Objects" is that they have better life than "The life of Programmers".


I can't help you with the everything through default.aspx, but about the object life-cycle I can say this:
If an object is created server-side and not saved in something like viewstate or a session or something similar, then everytime a request finished (the page has been generated and shown to the user) it has been destroyed. Everytime a user refreshes the page of your application all objects and instances not previously saved will be completely re-created, sometimes with variables which were saved (i.e. a TextBox's Text property) or grabbed (from POST variables).

It took me a little getting used to, that every time I access a page everything basically started from scratch...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.