session questions

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

A few quick questions:

1. when a user sends a request to the server, does this reset the session
timeout back to the default? i.e.: 20 minute session timeout, user does
nothing for 15 minutes, submits back to the server, the user has a renewed 20
minutes.


2.
I have a server side command button on a web form. When they click okay
a. the session is closed with session.abandon

b. a client side java script fires that closes the browser window. But it
does'nt work
my syntax is wrong, can someone have a look?

INPUT id="cmdExit" style="Z-INDEX: 108; LEFT: 384px; WIDTH: 72px; POSITION:
absolute; TOP: 496px; HEIGHT: 24px"onclick="JavaScript:window.close()"
type="button" value="Exit" name="cmdExit" runat="server">

also is this even possible? which will fire first the client side or the
server side?
if client fires first, will the server side session.abandon ever fire?

thanks

Chris
 
I just figured out the session counter is reset but still having problems with
number 2 question
 
I use something like this
Response.Write(<script>alert(window.close)</script>); in the click event,
followed by your abandon session stuff.

One important point to note is that the browser will prompt the user before
closing the window. To get around that you would need to set the window.self
property before calling close.


--
Regards
Alvin Bruney
[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
available at www.lulu.com/owc
 
Back
Top