NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Neil Porter on June 07, 2013, 01:18:43 PM
-
I've been playing around with passing variables from one area of my program to another, and I always use Session variables.
I keep looking in the generated code, to try and get a better understanding of what Bruce is doing under the hood, and I notice that sometimes he uses Get/SetValue and other times he uses Get/SetSessionValue.
What is the real difference, and when is it appropriate to use each one?
Regards,
Neil.
-
The key difference is scope. Values exist "on the thread" whereas SessionValues apply to the session.
So values are used to pass "parameters" if you like, from the browser to the server, on (on that thread) from one procedure to the next. At the end of the request (about a tenth of a second later) they vanish
SessionValues on the other hand exist for the life of the session.
cheers
Bruce
-
Thanks Bruce,
That makes sense.
Regards,
Neil.