take vb.net server side arraylist and convert to javascript array
I have an array list on my server side that i want to use on my client开发者_如何学运维 side as an array how can i do this.
You can return it as JavaScript Object Notation ( JSON ) see this question here on StackOverflow on "How can I encode an Array in VB.NET to JSON?".
To quote @bdukes answer:
Dim serializer as New JavaScriptSerializer()
Dim arrayJson as String = serializer.Serialize(myArray)
精彩评论