다음 C# 배열이 있고 JavaScript로 전달하고 싶습니다. 그것을 성취하는 가장 좋은 방법은 무엇입니까? 고맙습니다?JavaScript에 C# 사용자 정의 배열 전달
public static List<ListDetail> GetMyList()
{
List<ListDetail> myList = new List<ListDetail>();
myList.Add(new ListDetail() { Id = 1, Name = "Party" });
myList.Add(new ListDetail() { Id = 2, Name = "Course" });
myList.Add(new ListDetail() { Id = 3, Name = "Home" });
return myList.ToArray;
}
? 서버 측 코드에서 웹 페이지로? – kemiller2002
읽어보기 : http://stackoverflow.com/questions/11345382/convert-object-to-json-string-in-c-sharp –