Go Back   CodingForums.com > :: Server side development > ASP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-14-2002, 05:42 PM   PM User | #1
nasos007
New to the CF scene

 
Join Date: Nov 2002
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
nasos007 is an unknown quantity at this point
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
nasos007 is offline   Reply With Quote
Old 11-14-2002, 06:52 PM   PM User | #2
Roelf
Senior Coder

 
Join Date: Jun 2002
Location: Zwolle, The Netherlands
Posts: 1,110
Thanks: 2
Thanked 28 Times in 28 Posts
Roelf is on a distinguished road
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
Roelf is offline   Reply With Quote
Old 11-15-2002, 12:20 AM   PM User | #3
whammy
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
whammy is an unknown quantity at this point
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. ;)
whammy is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:06 PM.


Advertisement
Log in to turn off these ads.