Please suggest how to use this timeout solution

Discussion in 'ASP .Net Security' started by jonefer, Feb 7, 2007.

  1. jonefer

    jonefer Guest

    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
    jonefer, Feb 7, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    430
  2. Replies:
    1
    Views:
    6,264
  3. Replies:
    3
    Views:
    326
    David
    Nov 14, 2006
  4. Mark Probert

    Timeout::timeout and Socket timeout

    Mark Probert, Oct 6, 2004, in forum: Ruby
    Replies:
    1
    Views:
    1,271
    Brian Candler
    Oct 6, 2004
  5. Replies:
    0
    Views:
    154
Loading...

Share This Page