title: Passing jquery string to code in razor
body: <p>I was wondering how I could pass a string that I made with javascript into a code block in razor. Given the few lines of simple js below:</p>
  
  <pre><code>var k=0;
  var str1 = 'Model.FeaturedItems[';
  var str2 = '].SubHeadline.ToString();';
  var query = str1 + k +str2;
  </code></pre>
  
  <p>How would I then pass the string query into a code block? something like this:</p>
  
  <pre><code>                   alert("@"+query);
  </code></pre>
  
  <p>should print the result of that line of code.
  <strong>EDIT:</strong>
  Basically I want to execute this code: <code>Model.FeaturedItems[0].SubHeadline.ToString();</code> and do something with the result in jquery. However I keep getting a syntax error trying the above.</p>