Hi here I\'m trying to call a [webmethod] on bodyunload method.
But it is getting fired on page load itself only. How do i prevent it?
Here\'s the code I am
There is no way to consistently handle this type of event. There are too many causes for a session to "end". The very simplest of these would be a lost or closed connection. In this case any JavaScript fired off would never reach the server.
Even if you can get this working the way you want it is only going to work part of the time. If you can't rely on it your time may be spent and a different solution.