Check if Session("name") is undefined

Results 1 to 2 of 2

Thread: Check if Session("name") is undefined

  1. #1
    Svetlana Guest

    Default Check if Session("name") is undefined

    Hello to all!<BR>I have a Session variable Session("name") which is underfined at the first time when page is open. And it gets some value when user is logged on.<BR>At the beginning of every page I check for that variable and if it has any value I don&#039t have to logon user again.<BR>The problem is : how can I check for the first time when Session("name") is underfined?<BR><BR>I tried to do<BR>if (Session("u_name") == "")<BR> bLogon = true;<BR>but it doesn&#039t go to loop.<BR>Right now it works like<BR>if (String(Session("u_name")) == "undefined")<BR> bLogon = true; <BR>But it&#039s silly. I use asp and JavaScript.<BR><BR>What should I do with this check?<BR><BR>Thanks ahead!!!<BR>

  2. #2
    Tony Goodridge Guest

    Default RE: Check if Session(

    Try using LEN(Session("name"))<BR><BR>If the length of the string is 0 then it hasn&#039t been used yet<BR><BR>Regards,

Posting Permissions

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