Я использую asp.net и веб-формы. В моем проекте у меня есть веб-сервис asmx
[WebMethod]
public string GetSomething()
{
// avoid circual reference(parent child)
List<RetUsers> res = repo.GetAllUser().Select(c => new RetUsers {User_ID = c.User_ID,User_Name = c.User_Name,Date_Expire = c.Date_Expire }).ToList();
string res1 = res.ToJson();
// extension methods
return res.ToJson();
}
И результат в этом формате.
[
{"User_ID":1,"User_Name":"Test 1","Date_Expire":null},
{"User_ID":2,"User_Name":"Test 2","Date_Expire":null}
]
Как я могу добавить этот результат в $.ajax sucess для получения этого результата:
1 - Тест 1, 2 - Тест 2.