Hello,

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?

serkan sendur commented: it didnt mean to be useful -1

Recommended Answers

All 3 Replies

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".

ok?

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...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.