Calling ServerSide Function On Page Unload

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • windows_mss
    New Member
    • Jun 2006
    • 13

    Calling ServerSide Function On Page Unload

    Is't Possible To Call Code Behind Function( Server Side Function) In ASP.NET While Unloading a Web Page, i want to call ServerSide Function In
    Code:
    <body onunload="example()">
    ,

    Please Gudie Me,

    Thanks In Advance
  • jhardman
    Recognized Expert Specialist
    • Jan 2007
    • 3405

    #2
    Originally posted by windows_mss
    Is't Possible To Call Code Behind Function( Server Side Function) In ASP.NET While Unloading a Web Page, i want to call ServerSide Function In
    <body onunload="examp le()">

    Please Gudie Me,

    Thanks In Advance
    There are a couple of possibilities, but basically, asps only function when a call is made for a new page. It is valid, for example, to call for a new asp page in javascript onUnload which handles the things you need, then closes as soon as it loads. I've seen this done before in a pop-up window, but if the user blocks pop-ups I think it would fail.

    Another possibility is to put in a few application-level variables that track users, and make appropriate decisions when one user leaves. I've done this before when putting together a chat room (so if they don't log-out they are still removed from the chat). Do either of these options sound reasonable?

    Jared

    Comment

    Working...