Redirecting the page on Session.Timeout

C

cb

When a Session timeout occurs, I get a 403 - Forbidden. The address bar
contains the path that I was intending to go to but couldn't because of the
timeout.

How can I redirect the page when a Session.Timeout occurs?

TIA,

Chris
 
Ö

Ömür Ölmez

Hello

You can see if a session was timeout by checking its value. After
then, you can simply use Response.Redirect.

For example, assume you set a session named "loggedin" :

<%
if Session("loggedin")="" then
Response.Redirect("otherfile.htm")
end if
%>

Since redirect headers must the first (and only for old borwsers as
I know) header, this code is placed to top of the page.

Omur Olmez
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top