Event on closing browser window

    Date: 03/11/13 (Web Development)    Keywords: browser, asp, java, web

    Hi,
    I am working on a web site (ASP.NET, FW4) which has a secure section (login required).
    I would like to clear the session variables when customer closes the browser.
    To achieve that I have placed a hidden button on the MasterPage (have tested, it works) and then trying to call the ASP method using JavaScript.

        
        
    

    (Also tried to put this call into body tag: )

    CustomLogoff is not being called. Thought when calling it like this:



    It works fine (on button click of course).

    Is there a way to make it work on browser closing too?

    Source: https://webdev.livejournal.com/582886.html

« Basic HTML Document || N00blet soup »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home