Click here to Skip to main content
15,894,825 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
how to show alert message 2 min before session expire and keep my session live or increase session time out live ?
Posted
Updated 26-Dec-13 0:34am
v2

Refer:-http://forums.asp.net/t/1207721.aspx[^]

XML
<script type="text/javascript">
var lefttime=25;
var interval;
interval = setInterval('change()',60000);


function change()
{
   lefttime--;
   if(lefttime<=2) alert("the session will be off, left time is "+lefttime+" second!")
}
</script>

This may help.
 
Share this answer
 
Comments
utm 26-Dec-13 23:40pm    
its working.. thank you.
i modify it and set lefttime value at runtime. thats it.
Gitanjali Singh 27-Dec-13 0:31am    
Welcome
refer below link for jquery which show session out message and keep alive sssion on ok button click:-

http://pure-essence.net/2010/02/14/jquery-session-timeout-countdown/[^]

demo example:-
http://regretless.com/stuff/jQuery/jQuerySessionTimeoutCountdownWithDialog.html[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900