You can try JSON or just convert your list to a comma-delimited string, which would be very easy to parse using the string split function with JavaScript .
RegisterArrayDeclaration (arrayName, arrayValue) is another option. Check out the link.
From the link:
If you need to create a client part of a JavaScript Array object with some value set, use this method to add a value to a specific array.
To add values 1, 2, and 3 to an client-side Array object named FavoriteNumbers, you must use the following server-side code:
RegisterArrayDeclaration("FavoriteNumbers", "1")
RegisterArrayDeclaration("FavoriteNumbers", "2")
RegisterArrayDeclaration("FavoriteNumbers", "3")
This code will emit the following client side script:
<script language="javascript">
</script>
source
share