You could use JavaScriptSerializer to generate the JS representation of your data.
<script type="text/javascript">
var nameList = <%= new JavaScriptSerializer().Serialize(ViewData["names"]) %>;
</script>
marcind
2010-09-30 02:12:17