How to Call serverside function from client side code

May 15 2009 3:22 AM

I am creating an application, where I am dealing with userStatus (online/offline). When user will close the browser window i want to call a server side method which will abandon the session and update the user status.
I am not using Ajax/ update panel for my application.
My code is --
<head>
 <script language="javascript" type="text/javascript">
   function HandleClose()
   {
     alert("Killing the session on the server!!");
      // here I want to call a server side function
   }
  </script>
</head>
<body onunload="HandleClose()">



Answers (1)