
410
|
Chapter 19: The HttpSessionState Class
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
name
A string argument containing the text key to apply to the item or by which to
retrieve the item.
index
An integer argument containing the index of the item whose value will be
retrieved or modified.
Example
The example sets the values of two items in the Session collection. If these items
do not already exist in the collection, they will be added. The example then
displays the two values:
Sub Page_Load( )
Session.Item("foo") = "foo"
Session.Item("foo2") = "foo2"
Message.Text = CStr(Session.Item("foo")) & "</br>"
Message.Text &= CStr(Session.Item(1))
End Sub
Notes
The Item property is accessed implicitly when using the syntax:
Session("foo") = "foo"
which is commonly seen in classic ASP code. Using the Item property is not
required, but it may make your code more readable and understandable than
accessing it implicitly.
Note that an index may be used only as an argument when modifying a value, not
to create a new item. The index must also be smaller than the number of items in
the Session collection or an exception will be thrown.
LCID
Integer = Session.LCID
Session.LCID = Integer
Returns or sets an integer containing the locale identifier for the session. The
locale identifier determines how information such as date/time values is
formatted.
Parameter ...