Monday 21, May 2012
Welcome Guest, Register | Login  
      Home    |    Tutorials    |    Free Ebooks    |    Free Scripts    |    Articles    |    Blog     |    About Us    |    Contact Us

ASP Sessions

The ASP Session Object allows you to keep information specific to each of your site's visitors. Information like username, shopping cart, and location can be stored for the life of the session so you don't have to worry about passing information page to page. Variables stored in a Session object hold information about one single user, and are available to all pages in one application. Common information stored in session variables are name, id, and preferences. The server creates a new Session object for each new user, and destroys the Session object when the session expires.

ASP Session ID:

The ASP Session ID is the unique identifier that is automatically created when a Session starts for a given visitor. Here is an example to store user’s SessionID to a variable.

<%

DIM uSessionID
uSessionID=Session.SessionID

%>

Session Time Out:

The default session timeout period is 20 minutes. If a user has not requested or refreshed the page, session will expire. You can set this timeout by using session Timeout property.

<%
Session.Timeout=40
%>

Now session timeout period is 40 minutes.

Storing Session Variables:

Below is the example to store values in session variables.

<%
Session("username")="james"
Session("level")="member"
%>

Retrieve Session Variables

<%

response.Write(Session("username"))
response.Write("<br>")
response.Write(Session("level"))

%>

 
     
   
ASP Tutorial
 
  ASP Introduction
ASP Introduction
  ASP Syntax
ASP Syntax
  ASP JavaScript
ASP JavaScript
  ASP Variables
ASP Variables
  ASP Arrays
ASP Arrays
  ASP If Statement
ASP If Statement
  ASP Procedures
ASP Procedures
  ASP Functions
ASP Functions
  ASP Sessions
ASP Sessions
  ASP Cookies
ASP Cookies
  ASP Application Object
ASP Application Object
  ASP Forms
ASP Forms
  ASP Comments
ASP Comments
  ASP Email
ASP Email
  ASP ADO
ASP ADO
  ASP File
ASP File
 
 
 
Web Designing Tutorials
  HTML Tutorial
HTML Tutorial
  DHTML Tutorial
DHTML  Tutorial
  CSS Tutorial
CSS Tutorial
  XHTML Tutorial
XHTML Tutorial
 
Programming Languages Tutorials
  C Language Tutorial
C Language Tutorial
  C++ Tutorial
C++ Tutorial
  Java Language Tutorial
Java Language Tutorial
  Data Structure Theory Tutorial
Data Structure Theory Tutorial
 
Server Side Scripting Tutorials
  PHP Tutorial
PHP Tutorial
  SQL Tutorial
SQL Tutorial
  ASP Tutorial
ASP Tutorial
 
Client Side Scripting Tutorials
  JavaScript Tutorial
JavaScript Tutorial
  VBScript Tutorial
VBScript Tutorial
 
 
 
POPULAR E-BOOKS
 
Download Affiliate Marketing Mistakes Ebook Affiliate Marketing Mistakes
   
Download List Building For Beginners  Ebook List Building For Beginners
   
Download Tellman s List Building Club Ebook Tellman s List Building Club
   
Download How To Really Make Money with Pay Per Click Affiliate Marketing Ebook How To Really Make Money with Pay Per Click Affiliate Marketing
   
Download Generate a Passive Income  Ebook Generate a Passive Income
   
 
Studiesinn.com © 2012 All Rights Reserved.
Website Designed & Developed by TechXprtz