Greetings...
I am using sys.net.webrequest to call a webservice via the invoke command... A callback is added using the add_completed(somefunction) function... This works fine the first time,,, but subsequent use of this function on the same page results in the completed function (somefunction) being called prior to invoke completing,,, hence resulting in old data being returned... I have tried using the remove_completed(somefunction) to no avail... The code looks something like this:
function CreateCom()
{
var content = $get('MainContentDiv');
content.innerHTML = "<br/>";
var req = new Sys.Net.WebRequest();
var url = String.format("Services/CreateEcomCommission.svc/{0}", selectedMonth);
req.set_url(url);
req.add_completed(ajaxEcomComCallback);
req.set_httpVerb('GET');
alert("1");
req.invoke();
alert("2");
}
function a ...
Go to the complete details ...