Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Jun 2002
    Location
    Bonny Scotland! Status: Insane
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Session redirect...

    How would I redirect to an URL that is in a Session variable? (Should b easy)
    Thanx, Gaffer
    G壣ꮻ

  • #2
    New Coder
    Join Date
    Jan 2003
    Location
    Peterborough, UK
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Response.Redirect Session("varName")

  • #3
    New Coder
    Join Date
    Jun 2002
    Location
    Bonny Scotland! Status: Insane
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hmm, strange, i tried that 1st & it gave me some error so I probably set up the Session wrong. Thanx, neway
    G壣ꮻ

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    Zwolle, The Netherlands
    Posts
    1,120
    Thanks
    2
    Thanked 31 Times in 31 Posts
    you cannot redirect if some of the response is already written to the browser, use Response.buffer = true, this way all the response is buffered until its complete or the response.flush method is used. That way you can redirect in every place of your asp. Otherwise you have to do the redirect before the first html is sent to the browser
    I am the luckiest man in the world

  • #5
    New Coder
    Join Date
    Jun 2002
    Location
    Bonny Scotland! Status: Insane
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ah! Thanx! That works now!
    G壣ꮻ

  • #6
    Senior Coder
    Join Date
    Jun 2002
    Location
    41 8' 52" N -95 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This is another nice thing about using subs to display HTML like I do - you never have to worry about that!
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)


  •  

    Posting Permissions

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