I'm developing a website in VB.NET/ASP.NET 2.0.
I want to invoke an event (Server Side) once a user leaves my site by putting a different URL in the address bar, is it possible? If so, how?
I'm developing a website in VB.NET/ASP.NET 2.0.
I want to invoke an event (Server Side) once a user leaves my site by putting a different URL in the address bar, is it possible? If so, how?
You can use the onbeforeunload
JavaScript event to trigger when a user is about to navigate away from your site.
Invoke the onbeforeunload
event, like such :
window.onbeforeunload = function () {
//Your logic
};