title: Use javascript parameter as razor array index
body: <p>I want to use a parameter in my javascript function as the index parameter to my razor array.</p>
  
  <pre><code>function loadTemplate(index) {
      $("#wellContainer").empty();
      var htmldata = @Model.ServiceTemplateList[index].html
      $("#wellContainer").append(htmldata);
  }
  </code></pre>
  
  <p>I get <code>The name index does not exist in the current context</code>.</p>
  
  <p>What am i doing wrong?</p>