How to Use Session Variables in Microsoft ASP.NET


show more Using session variables provides you with in-depth training on Developer. Taught by David Gassner as part of the ASP.NET Essential Training show less
please wait ...

Using session variables

When you need to persist data in memory between page requests that's unique to each individual user and those pages aren't connected to each other through the web form system, that is, they aren't posting to each other, you can choose to use session variables. A session variable is stored in memory on the server but a copy of the session variable is stored for each individual user session and that session in turn is managed with cookies. A cookie is a bit of data that's created on the server and sent back to the browser along with the response to what an http request.

In the ASP.NET Framework and with many other application servers, session cookies are created automatically. Whenever a page is loaded, the server will detect that a new user session is starting and it creates a session cookie known as the User Session Token and sends that back to the browser with its first response. The browser then includes that cookie with each subsequent request, essentially reminding t...

Using session variables
Video duration: 6m 37s 6h 24m Beginner Updated Feb 13, 2013

Viewers:

Using session variables provides you with in-depth training on Developer. Taught by David Gassner as part of the ASP.NET Essential Training

Subjects:
Developer Web
Software:
ASP.NET
Author:
please wait ...