Parameter | Detail |
---|---|
limit | The parameter of the C# method. You supply the argument via the Page Method. |
onSuccess | The JavaScript function that is executed when the Page Method call is successful. |
onError | The JavaScript function that is executed when there is an error in the Page Method call. |
In the example the C# function just request one parameter, if you need to pass more than one you can do it, just put them in order in your JS call and you are good to go. Ej.
//C#
public static int SumValues(int num1, int num2, int num3, ..., int numN)
//JS
PageMethods.SumValues(num1, num2, num3, ..., numN, onSuccess, onError);
In the onSuccess
function the result is going to be the C# function's return value.
In the onError
function the result is going to be the error.