Re: custom base classes

Tech-Archive recommends: Speed Up your PC by fixing your registry



Hi Matt,

Each time a page request is made the ASP.NET Page object is recreated,
so any instance values that were set in the previous request will be
lost. It's possible to get around this by using static class
properties, however these will be lost when the application domain is
recycled, which happen by default every 29 hours, and whenever you
modify web.config. This approach is not considered best practice for
maintaining state across page requests.

Better approaches would be to use the Session object, cookies or the
viewstate, depending on your requirements. For maintaining
application-wide data, consider using a database or the Cache object
(in preference of the Application object). If you want to persist
state data for individual users, take a look at using ASP.NET 2.0
profiles.

Hope that helps,

Chris

.



Relevant Pages

  • Re: Where are the SuSE 9.2 Professional CD ISOs?
    ... and get on with the learning process. ... and possibly discouraging, answer to your initial request, they are trying ... Stick around, and gain an education. ... "Lost? ...
    (alt.os.linux.suse)
  • Re: Good stuff!!!!!!!!!!!!!!!!!!!!!!!!
    ... REG, I'm afraid that you've lost me, in part because of your lawyer's ... mind, but also because by changing the example, you've changed the ... Should such a request be honored? ... deleted my upload. ...
    (rec.music.opera)
  • Re: posting to group
    ... threads, and yes depending on the discussion generated for each post, they can ... get lost in the depth of it. ... > request for the url of my site. ... > that email is discouraged because of spam. ...
    (microsoft.public.frontpage.client)
  • Re: 2 threads
    ... Waiting for someone to request that he join a thread. ... mistake -- he lost a bet, and promised to bow out of any future threads ...
    (alt.smokers.cigars)
  • Re: [SLE] < RANT > *5
    ... On Wednesday 18 February 2004 03:29, Steven T. Hatton wrote: ... > Perhaps the request for help got lost in all the ranting. ...
    (SuSE)