I have a better solution than a warning.
What about session that never times out if user has his browser window open.
Here is what i am doing
1. Somewhere on each page (usually in a footer ) i have <img
src="/transparent.gif" name="renewSession" width="1" height="1">
2. Also each page has a following javascript.
<script language="Javascript">
window.setInterval("renewSession()", 600000);
function renewSession()
{
document.images("renewSession").src = "/renewSession.aspx?par=" +
Math.random();
}
</script>
3. Have a renewSession.aspx which outputs the transparent gif 1x1 pixel.
Done. Notice that you need Math.random() to prevent caching. Also in
renewSession.aspc use Response.Expires = -1.
You can easily create UserControl which implements all that and make that
control as a part of your header, footer,... what ever you have on each
page.
George.
"Harry Simpson" <hs*******@nospamphgt.net> wrote in message
news:OM*************@TK2MSFTNGP12.phx.gbl...
Got a web app that keeps the 20 sec session timeout default. Only deal is
the user doesn't know the session timed out till they submit the page. On
one page that i actually don't care if it times out i have a meta tag that
refreshes at about 18 minutes so the screen never times out.
On the other pages that i want to time out, i'd like to pop a warning that
the screen has timed out that will stay visible til the user clicks
OK......
What's the best way to acheive this result?
Thanks
Harry