Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Apr 2007
    Thanked 3 Times in 3 Posts

    Opinion on Class Property VS Session Var

    Hi Guys,

    I am looking for a way to store some data that i will need to call on alternate pages. What is the best way to accomplish this task. Should i define a property in my class (not sure if it will hold the page refresh) or should i send me data into a custom session variable. Or is it best to use a cookie? I've never used cookies before so i am ignorant to their ease or difficulty of use. Which way is best? I will need to be able to call this information and then overwrite it upon demand.


  2. #2
    Senior Coder Dormilich's Avatar
    Join Date
    Jan 2010
    Behind the Wall
    Thanked 440 Times in 436 Posts
    then you’ll most likely need session variables, as objects don’t persist in a page reload.
    The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.
    André Behrens, NY Times Software Developer


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts