How Session variables work

Tutorials Shared by the Internet Community

Advertisements

  Top Tutorials     New Tutorials     Submit     Login     Register  

Tutorial Detail

How Session variables work

Session variables can store user-specific information for you.
http://coveryourasp.com/Session.asp
  • Total Hits: 13806

  • Average Rating :
    URL RatingURL RatingURL RatingURL RatingURL Rating

  •  

  • Total Votes: 140 votes

  • Category: ASP/Cookies and Sessions

  • Submitted on: 2008-03-06 09:03:23

  • Submitted By: Devesh Khanna

  • Set as Favorite

Description:

This article follows on from my earlier article about Application variables, and how they allow you to store "global" data for use by all your pages.

The crucial difference between Application and Session variables is that Session variables are specific to each visitor to your site.

Background: The stateless web

The problem that Session variables have to overcome is that the HTTP protocol that you use to browse the web is stateless. Each request for a page is completely independant of earlier requests, so if you want subsequent pages to "remember" the users name that he entered on your front page you have to store that information somewhere.

This remembering of user-specific data is called "maintaining state". We'll see next how the ASP Session object can help us do just that.    More detail...

Rating Detail

 Stars  Percentage  Total Vote
 One star  Vote LeftVote MiddleVote Right 38.57%  54
 Two starsTwo star  Vote LeftVote MiddleVote Right 10%  14
 Three starsThree starsThree stars  Vote LeftVote MiddleVote Right 11.43%  16
 Four starsFour starsFour starsFour stars  Vote LeftVote MiddleVote Right 11.43%  16
 Five starsFive starsFive starsFive starsFive stars  Vote LeftVote MiddleVote Right 28.57%  40

Caste Your Vote

 Rating  Selection  Guidelines
 Poor:     Very disappointing, useless.
 Fair:     Below average, disappointing but not useless.
 Good:     About average in its class.
 Very Good:     Above average for its category.
 Excellent:     One of the best Tutorials in its category.






Advertisements