Session variables

Results 1 to 4 of 4

Thread: Session variables

  1. #1
    Join Date
    Dec 1969

    Default Session variables

    I&#039m trying to use session variables in my asp application to maintain a record of the user session.<BR>Session("mrlogin") = "NEEL"<BR>Session.Timeout = 200<BR><BR>The above 2 lines are executed after the user has been logged on successfully.<BR><BR>When I try to validate the session variable in another page <BR>if session("mrlogin") = "NEEL" then<BR>&#039Login Successful <BR>it does not work. The value stored in the session variable at that page is always "" (blank).<BR><BR>Earlier the asp code used to be in a different directory for different functions performed by the application based on modules.<BR>Even though all the code has been moved to a single directory, it does not work.<BR><BR>Any help would be appreciated.<BR>Thanks.<BR>

  2. #2
    Corin Guest

    Default Use a cookie instead

    Response.Cookies("mrlogin")("firstname") = Neel<BR><BR>then access it on each page<BR><BR>fn=Request.Cookies("mrlogin")("firstna me")<BR><BR>then do your If statement<BR>

  3. #3
    Vidya Guest

    Default it works for me...

    U may have to write this before the &#060;html&#062; tag..<BR>session("ID") = "Myname"<BR><BR>validation....<BR><BR>id = Session("ID")<BR>if id = "Myname" then<BR>

  4. #4
    Join Date
    Dec 1969

    Default RE: Session variables

    Session variables will maintain state only within the same web<BR>site. Also the browser must have cookies enabled. You set the<BR>session timeout to 200 minutes.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts