I intend notifying the user 60 seconds before the session expires in asp.net. I would like the user to choose to renew the session or ignore the notification.
How can I achieve this in asp.net?
I intend notifying the user 60 seconds before the session expires in asp.net. I would like the user to choose to renew the session or ignore the notification.
How can I achieve this in asp.net?
When the page loads, you can set a javascript timeout to popup in the appropriate amount of time. It's not perfect, but probably good enough.
setTimeout("sessionAlmostGone()", 10 * 5 * 1000);
HTTP protocol doesn't provides way to push client, only pull allowed. Your task looks as "push" notification to client.
Instead use JScript-based timer on client side that after expiring timeout shows message about renewing session. If so AJAX allows you notify server to prolong or close session.