title: embedding javascript variable within razor syntax
body: <p>I have a method that looks like this</p>
  
  <pre><code>function endcall_click(leadid) {
      document.location = '@Url.Action("index","dispo",new{id=leadid})/';
  }
  </code></pre>
  
  <p>Of course it doesn't work because it treats "leadid" as a server side variable but I want to inject the javascript variable passed into the method.</p>
  
  <p>I tried wrapping lead id in  but that didn't work.</p>
  
  <pre><code>function endcall_click(leadid) {
      document.location = '@Url.Action("index","dispo",new{id="&lt;text&gt;leadid&lt;/text&gt;"})/';
  }
  </code></pre>
  
  <p>Any ideas?</p>