Hi,
How can I return multiple values from JQuery.Ajax() in the success function ?
I tried it:
$.ajax({
type: "POST",
url: "default.aspx/myFunction",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(msg) {
$("#myDiv").html(msg.a[0]);
$("#myDiv2").html(msg.a[1]);
}
});
And here my ASP.NET page:
<WebMethod()> _
Public Shared Function myFunction() As Array
Dim a() As String
a(0) = "value 1"
a(1) = "value 2"
Return a
End Function
It works just in unique return string, but array doesn't work :(