homepage Welcome to WebmasterWorld Guest from 54.161.240.10
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
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
shibonki




msg:970241
 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 %>
etc.

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

 

Dreamquick




msg:970242
 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;

<%
Session("Field1")=Field1.value
Session("Field2")=Filed2.value
%>

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