Welcome to WebmasterWorld Guest from

Forum Moderators: brotherhood of lan & mack

Message Too Old, No Replies

Session Content

problems with session contents



10:53 am on Feb 17, 2003 (gmt 0)

10+ Year Member

i am a newbee on web development.

most simple application:
have an asp with which a user can login with username and password.

username and password are used to retrieve a record from a msaccess database.
when not ok, login screen re-displayed.
no problem so far.
if ok, the i want to display the data from the database on a welcome screen, which is a different asp.

after accessing the database, i store the required data as
<% Session("Field1")=Field1 %>
<% Session("Field2")=Filed2 %>

then i redirect to welcome.asp

display of the username and password is OK
but displaying Field1 and Field 2 does not work.
sometimes just blanks
sometimes error Object not valid any longer.

I tried to use Session.Content(1) but that does not help.

i don't have a global.asa file. (tried that, but it doesnot solve anything)
please help


11:00 am on Feb 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

If you are putting data from the database straight into the session, try doing it like this;


That way you avoid issues about *what* exactly you are putting into session, as often "Field" may decide to store the field object rather than the field value, this way if there are errors while storing data you see the the problems at this point rather than later when you try to use them.

- Tony


Featured Threads

Hot Threads This Week

Hot Threads This Month