Keep Session Alive

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ramchandar
    New Member
    • Dec 2007
    • 11

    Keep Session Alive

    In my aspx page i want the lot of informations to be filled by the user. But wen the user takes some break to fill the form n resumes after some time the page gets expired. So to keep the session alive i used the following javascript code but it didnt work.

    Code:
    function KeepMeAlive()
        {
            var myImg;
            myImg =document.getElementById('keepAliveIMG');         
            if (myImg)
                myImg.src = myImg.src.replace(/\?.*$/, '?' + Math.random());
        }
     window.setInterval("KeepMeAlive()", 2000);
    So it would be helpfull if any one suggests some idea for calling the server method asychronously using javascript by which i can make the session alive.

    Thanks in advance.
    Ram
Working...