Is there a better way to output a javascript array from ASP.net?
With a bit of help from System.Linq this becomes quite easy.

var array = [ &lt;%= 
    string.Join(",", items.Select(v =&gt; "'" + v.ToString() + "'").ToArray())  
%&gt; ];