Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

asp

What is the ASP session object?

Behzad Ahmad

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Answers Code

The Active Server Pages (ASP) module includes different types of objects, including the ASP session object. This object stores information about user sessions.

A session object contains information about a single user; this information is available across the pages of an application.

The session object has certain methods, collections, properties, and events associated with it, which are described below.

Methods

  • Contents.Remove: Deletes an item from the Contents Collection.

  • Contents.RemoveAll(): Deletes all items from the Contents Collection.

  • Abandon: Destroys the user session by getting rid of the Session object and any resources allocated to it.

Collections

  • StaticObjects: Contains all the objects appended to the session with an HTML tag.

  • Contents: Contains all the objects appended to the session with a script command.

Properties

  • SessionID: Returns a unique ID for each user. The server generates the ID.

  • TimeOut: Sets or returns the timeout period (in minutes) for the Session object.

  • CodePage: Specifies the character set that is used when displaying dynamic content.

  • LCID: This property takes an integer argument to specify a region based on which dates, time, and currency are formatted.

Events

  • Session_OnStart: Occurs when a session is initiated by the server.

  • Session_OnEnd: Occurs when a session ends by either a timeout or a user ending it.

RELATED TAGS

asp

CONTRIBUTOR

Behzad Ahmad
Copyright ©2022 Educative, Inc. All rights reserved

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Answers Code
Keep Exploring