Author: Fredmello | Posted on: 4/1/2009 6:46:51 PM | Views : 898

Hi there,



Is there a way to call a web method in the HTML body (onunload/onbeforeunload) event?



Something like:



window.onunload = BeforeLeave;

function BeforeLeave() {

var pa = { "param": "abcd"};

Sys.Net.WebServiceProxy.invoke(webServicePath, 'LeavePage', useHttpGet, pa, null, OnFailed, "", timeOut);

}



I've tried many different solutions but it just work if I put an alert() into it.



Thanks in advance,

...

Go to the complete details ...