<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Show alert message when user idle for sometime on webiste</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.js"></script>
<script type="text/javascript" src="jquery.idle-timer.js"></script>
<script type="text/javascript">
$(function() {
var timeout = 5000;
$(document).bind("idle.idleTimer", function() {
$("#status").html("User is idle :(").css("backgroundColor", "silver");
alert("user idle for more than "+ (timeout/1000)+" secs")
});
$(document).bind("active.idleTimer", function() {
$("#status").html("User is active :D").css("backgroundColor", "yellow");
});
$.idleTimer(timeout);
});
</script>
</head>
<body>
<form runat="server" id="form1">
<h1>YOUR PAGE;/h1><h3>Showing User Active & Idle Status based on Time</h3>
<div id="status" style="padding: 5px;"> </div>
</form>
</body>
</html>
You can download and add some jquery file which is mentioned....