title: Sending a string like JSON from C# to javascript
body: <p>I have some code in <code>JavaScript</code> like this:</p>
  
  <pre><code>slider.setPhotos([
      { "src": "image1", "name": "n1" },
      { "src": "image2", "name": "n2" },
      { "src": "image3", "name": "n3" }
      ]);
  </code></pre>
  
  <p>And I want to set the values of <code>src</code> and <code>name</code> from <code>C#</code>.</p>
  
  <p>Assume values are like this in <code>C#</code>:</p>
  
  <pre><code>var images = new string[] {"/images/a1.jpg", "/images/a2.jpg", "/images/a3.jpg"};
  
  var names = new string[] {"First", "Second", "Third"};
  </code></pre>
  
  <p>How can I set these values into <code>JavaScript</code> code (i.e. in Page Load method in C# code)?</p>