Display login screen when session expires

L

leovega

Hello,

My aplication starts with a simple login window (login_page.aspx). Once
the login/password
is validated I redirect to an html which contains 3 frames.
(mywebsite.html)

The web site I am working on has 3 frames: left frame is for the
menu, top frame is where the user enter the search criteria and main
frame
is where the results are displayed.

I want to display the login screen as soon as the Session Timeout
expires,
so I realized I should redirect to the login page when the session
ends.
(Global.asax in VB . Net, I Included code in session_end function)

The problem I am having is that the login window is open in the last
frame used, and
I want to delete the frames. I mean I want to display the login page
in a normal document
without frames in the same active web browser screen.


Thanks for your help.

Leo.
 
E

Erwin Moller

leovega said:
Hello,

My aplication starts with a simple login window (login_page.aspx). Once
the login/password
is validated I redirect to an html which contains 3 frames.
(mywebsite.html)

The web site I am working on has 3 frames: left frame is for the
menu, top frame is where the user enter the search criteria and main
frame
is where the results are displayed.

I want to display the login screen as soon as the Session Timeout
expires,
so I realized I should redirect to the login page when the session
ends.
(Global.asax in VB . Net, I Included code in session_end function)

The problem I am having is that the login window is open in the last
frame used, and
I want to delete the frames. I mean I want to display the login page
in a normal document
without frames in the same active web browser screen.


Thanks for your help.

Leo.

Hi Leo,

The easiest way to accomplish that is from your login_page.aspx.
Let that page check if it lives in a framesset, and when it does, it
replaces the mainwindow with itself (instead of the mywebsite.html).

you can check to possible parentframe with:

if (parent == self){
// This is true for every toplevel windows
// so do nothing
} else {
// The document is inside a frameset, correct that
parent.location = "login_page.aspx";
}

Of course this trick only works if client has JS enabled.

Regards,
Erwin Moller
 

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,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top