SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Mar 2001
    Location
    Ottawa, Ontario, CANADA, North America, Earth
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Using Response.Redirect

    I have placed an include to "security.asp" at the top of each .asp page in the Members Area of my client's web site.

    When the following code in "security.asp" is executed, the user is redirected to the "join.asp" page but the url in the browser address bar still shows the last page's url.

    Is this the way it works?
    Was there something I placed in my code that is doing this?
    OR is there something else I need to add into my code?

    security.asp
    <%
    Response.Expires = 60 'expire at 60 seconds
    Response.Expiresabsolute = Now() - 1 'expire this page 24 hours ago
    Response.AddHeader "pragma","no-cache"
    Response.AddHeader "cache-control","private"
    Response.CacheControl = "private"
    Response.Buffer = True 'Buffers the content so our Response.Redirect will work

    'If the session variable if False or does not exist,
    'then redirect the user to the web site Join DRIE page
    If Session("blnIsMemberGood") = False or Len(Session("blnIsMemberGood") & "") = 0 Then
    'Redirect to the web site Join DRIE page
    Response.Redirect "/clients/drieottawa/new/join.asp"
    End If
    %>
    Thanks.
    Karen
    "Far away there in the sunshine are my highest aspirations. I may not reach them, but I can look up and see their beauty, believe in them, and try to follow where they lead." Louisa May Alcott

  2. #2
    SitePoint Wizard westmich's Avatar
    Join Date
    Mar 2000
    Location
    Muskegon, MI
    Posts
    2,328
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I believe that is the case because the server is redirecting the browser rather then browser requesting a file. You could add a bit of code to the page to reload it.
    Westmich
    Smart Web Solutions for Smart Clients
    http://www.mindscapecreative.com


Bookmarks

Posting Permissions

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