NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Neil Porter on June 07, 2013, 01:18:43 PM

Title: Value Queue or Session Queue
Post 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.
Title: Re: Value Queue or Session Queue
Post by: Bruce on June 09, 2013, 05:14:50 AM
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


Title: Re: Value Queue or Session Queue
Post by: Neil Porter on June 10, 2013, 11:23:48 AM
Thanks Bruce,

That makes sense.

Regards,

Neil.