I am calling the following C# method:
[WebMethod(true)]
public static List<ReadUserStructure> LoadFriends()
{
List<ReadUserStructure> returner = Friend.ReadAllFriends();
return returner;
}
With the following jQuery:
$.ajax({
type: "POST",
url: "Main.aspx/LoadFriends",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg) { alert(msg.Count.toString()); }
});
I have a break point on the C# method and it hits it. stepping through the method the function works fine and, in my user, creates a list with a count of 2. But this list if not getting returned to the client. Any ideas?
msg.Count.toString()<- This looks like C#, but it needs to be Javascript. Please add the results ofalert(msg);to your question.Listin C# will be downgraded to an array in Javascript.