Keep alive with jquery

2 posts, 0 answers
  1. John
    John avatar
    2 posts
    Member since:
    Apr 2012

    Posted 03 May 2012 Link to this post

    Can somebody help me to integrate this source code into a Telerik asp.net ajax?

    http://zeeshanumardotnet.blogspot.mx/2010/11/how-to-keep-session-alive-in-aspnet.html

    I need to have an intranet with no session timeout lost.
  2. John
    John avatar
    2 posts
    Member since:
    Apr 2012

    Posted 04 May 2012 Link to this post

    <script type="text/javascript">
        $telerik.$(document).ready(function () {
            alert("Document is ready");
            setTimeout(updateSession, 1000 * 60); //Timeout is 1 min
        });
     
        function updateSession() {
            $telerik.$.ajax({
                type: "POST",
                contentType: "application/json; charset=utf-8",
                url: "../../asmx/eKeepAlive01.asmx/UpdateSession",
                data: "{}",
                dataType: "json"
            });
            setTimeout(updateSession, 1000 * 60);
        }
    </script>


    Adding $telerik. was the trick for having the code running with jquery.
Back to Top