[WebMethod] public string CheckOutUser(string id) { return "OK"; }
$(function () { window.onbeforeunload = checkOutUser; }) function checkOutUser() { var url = "TrascriptionService.asmx/CheckOutUser"; var data = new FormData(); data.append('id', userId); var result = navigator.sendBeacon(url, data); }
userId
sendBeacon
true
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)