ASP.NETPage Methods


Parameters

ParameterDetail
limitThe parameter of the C# method. You supply the argument via the Page Method.
onSuccessThe JavaScript function that is executed when the Page Method call is successful.
onErrorThe JavaScript function that is executed when there is an error in the Page Method call.

Remarks

More than one parameter

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);

Return value

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.