1

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>
xShirase
  • 11,975
  • 4
  • 53
  • 85
Dofs
  • 17,737
  • 28
  • 75
  • 123

1 Answers1

1

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.

David Andres
  • 31,351
  • 7
  • 46
  • 36