Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: Passing of Variables btw few pages


Message #1 by "Rearon" <yap_g@p...> on Mon, 22 Oct 2001 12:18:29
Hi, Everyone, here I have one question regarding to the passing of 

variables btw few pages. Normnally if I pass variable among few pages, I 

will use Session or Cookies. Anyway, is there any other better methods to 

handle this issue since these 2 methods quite high resource consumption? 



Another question is if I compare Session and Cookies, which method is 

better? I know Session use quite high resource since it locate at server 

and Cookies at client side so it ease the burden of the server. Anyway, I 

think cookies quite dangerous in exposing personal security. Hmm...can 

anyone give me some idea?



Thanks arr...:)
Message #2 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Mon, 22 Oct 2001 12:46:01 +0100
There is nothing wrong with using session variables unless your application

is to run off multiple servers.  If your App just runs off one server, then

session variables are the most convenient way of retaining information

between pages, that is what they are there for.  Just don't store memory

intensive things like recordsets in them - strings, numbers and arrays are

fine.  And remember to empty the variable when you are finished with it.



-----Original Message-----

From: Rearon [mailto:yap_g@p...]

Sent: 22 October 2001 13:18

To: ASP Web HowTo

Subject: [asp_web_howto] Passing of Variables btw few pages





Hi, Everyone, here I have one question regarding to the passing of 

variables btw few pages. Normnally if I pass variable among few pages, I 

will use Session or Cookies. Anyway, is there any other better methods to 

handle this issue since these 2 methods quite high resource consumption? 



Another question is if I compare Session and Cookies, which method is 

better? I know Session use quite high resource since it locate at server 

and Cookies at client side so it ease the burden of the server. Anyway, I 

think cookies quite dangerous in exposing personal security. Hmm...can 

anyone give me some idea?



Thanks arr...:)
Message #3 by Dennis <dennist@g...> on Mon, 22 Oct 2001 17:44:04 +0530
Rearon,

           You can pass values by either using hidden fields (using the 

Post method), Querystrings , Sessions or Cookies.

However each run into their own problems and have their own advantages.



While using sessions or cookies u run the risk of your program not 

running on  browsers that don't support cookies(or where they r turned 

off).



By using hidden fields, u have to always use the POST method 

irrespective of whether u post thru ASP or Javascript.



By using Querystrings, u run the risk of the any passerby viewing values 

from the location bar and u also run into the problem of values getting 

truncated (for values above 1000 to 2000 characters).



Pick yourself the best solution depending upon your application's 

purpose.



regards,

Dennis. 


  Return to Index