Popup reminder before session ends

manju

New member
Joined
Jul 16, 2008
Messages
1
Programming Experience
5-10
Hi All,

We have an ASP.Net application v1.1
We have a request that we inform users 5/10mins before session timesout.
The question I have is, how can I implement this on a global level with no/minimum change to existing code?
If I am going in the wrong direction, can someone please tell me how to resolve this issue?

Heres what I have till now:
In .aspx page i have this scritp written
HTML:
<script language='JavaScript'>
            function fncSetTimeout()
            {
                window.setTimeout('alertUser()',10000);
            }
            function alertUser()
            {
                var newWindow = '';
                alert('Session is about to expire');
                newWindow=window.open('WebForm1.aspx', 'CyberSure','scrollbars=no,resizable=no,width=580,height=500,left=200,top=50, menu=no');
                newWindow.opener = self;
            }
        </script>
on page load I call this script
VB.NET:
Dim strTimerScript As String = "<script language='JavaScript'>fncSetTimeout()" + ";<" + "/" + "script>"
Page.RegisterStartupScript("timerScript", strTimerScript)


Thanks in advance
Manju
 
Last edited by a moderator:
Back
Top