A: 

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
good one! but the value return is now: "[a","b]" which is a string, not an array of string?
BeCool
FTFY - You don't need the single quotes around the beestrings <%= %>
jfar
That was a pretty cool solution indeed. It should render as an array if you remove the outer quotes as in: var nameList = <%= new System.Web.Script.Serialization.JavaScriptSerializer().Serialize(ViewData["names"]) %>;
Hector
Thats awesome, thanks guys!
BeCool
marcind