search
  • Sign In
  • Sign Up
Password reset successful

Follow the proiects vou are interested in andi aet the latestnews about them taster

ASP Session

Collection 17
Read 15263
update time 2016-09-11

The Session object is used to store information about the user session (session), or to change the settings of the user session (session).


tryitimg.gif

Try it - Example

Set and return LCID
This example demonstrates the "LCID" property. This property sets and returns an integer indicating the location or region. Contents such as date, time and currency are displayed based on location or region.

Return SessionID
This example demonstrates the "SessionID" property. This property returns a unique id for each user. This id is generated by the server.

Session timeout
This example demonstrates the "Timeout" attribute. This property sets and returns the session timeout in minutes.


Session Object

When you work on an application on your computer, you open it, make changes, and then close it. It's a lot like a conversation. The computer knows who you are. It knows when you open and close apps. However, on the Internet a problem arises: since HTTP addresses cannot maintain state, the web server has no idea who you are and what you do.

ASP solves this problem by creating a unique cookie for each user. A cookie is transferred to the user's computer and contains information that identifies the user. This interface is called a Session object.

The Session object is used to store information about the user session (session), or to change the settings of the user session (session).

Variables stored in the Session object store information about a single user and are available to all pages in the application. The common information stored in session variables is usually name, id, and parameters. The server will create a new Session for each new user and revoke the Session object when the session expires.

The collections, properties, methods and events of the Session object are described as follows:

Collection

CollectionDescription
ContentsContains all entries appended to the session via script commands.
StaticObjectsContains all objects appended to the session using HTML's <object> tag.

Properties

PropertiesDescription
CodePageSpecifies to display dynamic content The character set used.
LCIDSet or return an integer for the specified location or region. Contents such as date, time, and currency are displayed based on location or region.
SessionIDReturns a unique id for each user. This id is generated by the server.
TimeoutSets or returns the timeout (in minutes) for the Session object in the application.

Method

MethodDescription
AbandonRevoke a user's session.
Contents.RemoveRemove an item from the Contents collection.
Contents.RemoveAll()Removes all items from the Contents collection.

Event

EventDescription
Session_OnEndThis event occurs when a session ends.
Session_OnStartThis event occurs when a session starts.

Hot AI Tools
Undress AI Tool
Undress AI Tool

Undress images for free

AI Clothes Remover
AI Clothes Remover

Online AI tool for removing clothes from photos.

Undresser.AI Undress
Undresser.AI Undress

AI-powered app for creating realistic nude photos

ArtGPT
ArtGPT

AI image generator for creative art from text prompts.

Stock Market GPT
Stock Market GPT

AI powered investment research for smarter decisions

Popular tool
Notepad++7.3.1
Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version
SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1
Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6
Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version
SublimeText3 Mac version

God-level code editing software (SublimeText3)