Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reload 3 frames

Status
Not open for further replies.

NiteCrawlr

Programmer
Mar 16, 2001
140
BR
Hi,
I have a asp page where it is divided into three frames. I have a session variable which controls if the person is logged in or not.
I would like to know, how can I load a page saying "You have to log in again" (or something like that), when the Session expires, and I want this page to load in the whole page, not in a frame.

Thanks

Frederico
 
I dont use frames so I can't comment on the TARGET values you need. What I do is use my own piece of code to check if the session is about to expire, then redirect to my login page with an error code. Presuming that in you verification page you have set the current date and time into a session variable in the form...

Session("LastUsed") = Now()

Then in every other page you need to include the code...

ExpireTime = 10
TimeEXP = TimeSerial(Hour(Now()), Minute(Now()) - ExpireTime, Second(Now()))
TimeSess = TimeSerial (Hour(Session("LastUsed")), Minute(Session("LastUsed")), Second(Session("LastUsed")))
If TimeSess < TimeEXO Then
'DO WHATEVER YOU WANT TO DO WHEN THE SESSION HAS EXPIRED!
Else
Session(&quot;LastUsed&quot;) = Now()
'DO WHATEVER YOU WANT IF THE SESSION IS STILL GOOD
End If


Hope this helps. This example the session is set to expire in 10 minutes. This value should obviously be less than the server session timeout value.

Gary
 
Check out the FAQ Section in the HTML and CSS (Cascading Style Sheets) Forum

I think it has what u need

Regards Unicorn11
unicorn11@mailcity.com

[red]Luck is not chance, it's toil; fortune's expensive
smile is earned.[red]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top