I am trying to use a Web Service to return Json for a Collection of Users from a Database Table. I'm only new to .NET (< 1 week experience), and I don't want to use the UpdatePanel for AJAX. I have tried using the JavaScriptSerializer as well as Json.NET to serialize. Both cases seem to spawn an Infinite Loop.
What am I doing wrong? Is there a better way to do this? I appreciate any suggestions. Thanks.
Dim myUser As New HagarDB.Users
myUser.Read()
'Dim jsSerializer As New System.Web.Script.Serialization.JavaScriptSerializer
'Dim sbUsers As New System.Text.StringBuilder
'jsSerializer.Serialize(myUser, sbUsers)
Dim json = JsonConvert.SerializeObject(myUser, Formatting.Indented)