Asynchronous calls with AjaxPro

1.3k Views Asked by At

I have been working with synchronous calls in AjaxPro, and I am now looking into asynchronous calls. I have been looking at the example Here

My question is : How do I pass variables to my ajaxpro method?

I would like to add some properties to the AjaxMethod MyMethod :

<script type="text/javascript">
function callback(res) {
    alert(res.value);
}
function invokeMyMethod() {
    Namespace.Classname.MyMethod(callback);
}
</script>
1

There are 1 best solutions below

0
On BEST ANSWER

Your server-side method will look like this:

public void MyMethod(int param1, string param2, ...)

You need to call this from the client like so:

Namespace.Classname.MyMethod(param1, param2, callback);

That should do it.