homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / WebmasterWorld / New To Web Development
Forum Library, Charter, Moderators: brotherhood of lan & mack

New To Web Development Forum

Session Content
problems with session contents

10+ Year Member

Msg#: 352 posted 10:53 am on Feb 17, 2003 (gmt 0)

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



WebmasterWorld Senior Member 10+ Year Member

Msg#: 352 posted 11:00 am on Feb 17, 2003 (gmt 0)

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

Global Options:
 top home search open messages active posts  

Home / Forums Index / WebmasterWorld / New To Web Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved