asp.net - Redirect to login page after session timeout without postback -


in application can redirect user login page after 5 minutes of inactivity. happened after postback. wanted user redirect page after 5 minutes of inactivity without doing postback. long didn't click (e.g. sorting) after 5 minutes redirected.

by way, i'm using update panel on pages.

thank you. please help.

you can use javascript detect inactivity. if you're using jquery, there's plugin called jquery.idle

probably you'll need this.

    $(document).idle({   onidle: function(){     // todo: redirect logout page.   },   onactive: function(){     // todo: maybe don't need it.   },   idle: 300000 // 5 minutes onindle function called. }) 

you need register script update panel using scriptmanager.registerclientscriptblock or scriptmanager.registerstartupscript. somehting this.


Comments

Popular posts from this blog

java - Null response to php query in android, even though php works properly -

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -