How to do postback?

G

Guest

Hi all,
How to do last postback after user directly close the IE?

The last postback will contain instruction to update certain status in
server side.
Any ideas?
Thank you in advance.

Best regards,
Ocurnos
 
M

Mark Rae

The only way is to rely on JavaScript and events such as OnBeforeUnLoad
(which might only work in IE??). When the event fires, you can simulate a
linkbutton on your page being clicked with the __doPostback() call.

I've never got this to work with any sort of reliability even when moving
from one page to another, but to get it to work when the user closes down
their browser as the OP asked...? I think there's almost no chance at all...
 
G

Guest

Not sure, if you have alreday considered Session_End.

The Session_End event in gloabl.aspx page is used widely for this
purpose..This event doesnt get fired immediatly .. but will fire after the
session timeout period (default is 20 mins) . Also you will not be able to
collect any data entered by the user in the last screen..

Other choice is to explore ,as Karl Seguin suggested, if onbeforeupload
would work . One point to remeber is, When you handle the onbeforeunlnoad
event the browser wouldnt know if the user is ending the session or going to
a new page or new site...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,201
Latest member
KourtneyBe

Latest Threads

Top