Please suggest how to use this timeout solution

J

jonefer

I found a script that seems to address my timeout problem.
However, I'm not certain what event to tie it to?

If I was working with MS Access I would put this in the 'CURRENT' event of a
form,
meaning, anything that the user clicks would fire this code.

But since this is ASP.NET 2.0 please suggest how I can cause this code to
fire when a user decides to click on a control (any control) - because I
plan to use to catch any click after the session expires:

'=====code that should fire on any action =====
Dim popupScript As String = "<script language='javascript'>" & _

"alert('Your session has timed out, Re-checking your
credentials.');window.location='FindMember.aspx';" & _

"</script>"

Dim wentThruIndexAspx As Object = Me.Session("AuthenticatedUser")
If AuthenticatedUser Is Nothing OrElse
AuthenticatedUser.ToString.Trim.Length = 0 Then
Page.RegisterStartupScript("PopupScript", popupScript)
End If
 

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

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top