title: Pass List<int> as argument of Javascript function
body: <p><br>
  I want to accept List as argument of javascript function.<br>
  I am calling this function from code behind.<br>
  And passing one List to the function.<br>
  But i got "System.Collections.Generic.List`1[System.Int32]" as value of argument when function called.<br>
  What should i do to get list when function called.<br>
  My code is:<br>
  Default.aspx.cs<bR></p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
      {
          List&lt;int&gt; num = new List&lt;int&gt; { 12, 13, 14, 15, 16, 17, 18 };
          List&lt;int&gt; oddNum = num.Where(n =&gt; n % 2 == 1).ToList();
  
          ScriptManager.RegisterStartupScript(this, GetType(), "test", "test('"+oddNum+"');", true);  
      }
  </code></pre>
  
  <p>Default.aspx<br></p>
  
  <pre><code>&lt;head runat="server"&gt;
      &lt;title&gt;&lt;/title&gt;
      &lt;script type="text/javascript"&gt;
  
          function test(oddNum) {
              alert(oddNum);
          }
      &lt;/script&gt;
  &lt;/head&gt;
  </code></pre>