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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Nov 2002
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ASP redirect to new page

    Hi All,

    I am using ASP and ASP.NET on a page with frames.

    I have a form on the right frame, but if the session times out, I want to break out of the frames. [does this make sense???]

    I am using the line below, but I want it to open in the parent window=

    Response.Redirect("default.aspx", True)


    My questions:
    Is this possible? and how?

    Your time in helping me is greatly appreciated!
    Nas

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Zwolle, The Netherlands
    Posts
    1,120
    Thanks
    2
    Thanked 31 Times in 31 Posts
    no, the server has absolutely no knowledge of the location in the frameset of the page it is currently processing. This sort of things you have to take care of in the browser -> client side

  • #3
    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
    You can't determine a Session.Timeout from the client-side. What you CAN do is start a timer in javascript when the page is loaded... and if that timer gets to 20 minutes (assuming you're using the default Session.Timeout), break out of frames at that point, and replace the window.location with whatever you want, instead of trying to redirect server-side.

    Trying to redirect on the server will not work, since the client has not requested anything from the server.

    If they did, then the session would not time out, since Session.Timeout would be reset.

    I hope that makes sense, but that's really the wrong way to go about the whole thing... probably you want to present them with a new page if they make a request to the server after the session has timed out.
    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
    •