I\'ve just been given a new task to bootstrap a website created by someone else. But I\'m absolutely new to Web. The website is in ASP.NET,C#. The code itself is not hard to
Session
is used to store data for the user's session on the web site. (this data store is per-user-browser session, and is subject to being wiped at any time by various application events)
It is generally used to store information across multiple page views in a user's session (ie. visit) to your website.
It can be used anywhere in code that runs in the context of the user's session; meaning inside a page, or in the appropriate application lifecycle events which run in the context of a session (such as Session Start)
As for your samples;
The first one, I can't fully explain, as I do not know what the function sh.pensDec()
is supposed to do.
The second one is checking to make sure there is a value stored in that session variable, before running the code that follows.