Redirect on Session Variable

Results 1 to 3 of 3

Thread: Redirect on Session Variable

  1. #1
    Jay Seagrave Guest

    Default Redirect on Session Variable

    I am trying to do a simple redirect based on the presence of a particular session variable("svNew"). I have tried everything I can think of, and it redirects whether the user has the variable or not!<BR><BR>Little help please?

  2. #2
    Join Date
    Dec 1969

    Default RE: Redirect on Session Variable

    what code are you using at the moment?<BR><BR>j

  3. #3
    Join Date
    Dec 1969

    Default RE: Redirect on Session Variable

    I usually try something like this: if the value would be an integer:<BR><BR>var blah = parseInt(Session("test"));<BR>if (isNaN(blah)) // or maybe if (!(blah &#062; 0))<BR> Response.Redirect(); // better maybe Server.Transfer()<BR><BR>if its a string:<BR>blah = new String(Session("test"));<BR>if (blah.toLowerCase() == &#039;undefined&#039; &#124&#124 blah.toLowerCase() == &#039;null&#039;)<BR><BR>anyway, this is probably quite a bit too much work, but i dont use it very often (at least not checking on just the existence).<BR><BR>This is a piece of code that actually is from one of my pages, although i doubt if the first part of the code !Session() has any real effect.<BR><BR>if (!Session("login") &#124&#124 Session("login") &#060;= 0)<BR> Response.Redirect("default.asp");<BR><BR>

Posting Permissions

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