Using a Session Object in ASP.NET

I was recently given a new task to download a site created by someone else. But I am absolutely not familiar with the Internet. The website is in ASP.NET, C #. The code itself is not hard to understand except for the Session object. I do not understand where, how and why it was used. Can someone explain the use of a Session object with a possible example?

PS What do these two lines mean?

    lblPensValue.Text = sh.pensDec((string)Session["connSTR"], 113, 23);
and
    if ((string)Session["connSTR"] == null)
+3
source share
5 answers

Sessionused to store data for a user session on a website. (this data store is a user browser session and can be erased at any time by various application events).

( ) -.

, ; , (, )

,

, , , sh.pensDec().

, , , .

+6

HTTP . WebServer , . , .

, , ASP.NET , Session .

. , "connSTR", . , ,

Session["connSTR"]

. Session , .

+5
(string)Session["connSTR"] // Return value from session and casting to string

Session, ASP.NET

+4

ASP.NET session state allows you to save and retrieve values ​​for a user when a user moves ASP.NET pages in a web application.

ASP.NET Session Status Overview

ASP.NET Session State Examples

+3
source

All Articles