title: how to get javascript variable into URL.Action mvc method
body: <pre><code>onSelectRow: function(id) {
     document.location.href = '@Url.Action("EditEncounter", "EditEncounter", new { encounterId = "'&lt;%:id%&gt;'", popId = TempData["POPULATIONID"] })'
                              //new { encounterId = temp.EncounterId, popId = (int)TempData["POPULATIONID"] }
  }
  </code></pre>
  
  <p>How in sam hill do I get that id variable into my Url.Action method?</p>
  
  <p>This is what I am looking at when I debugg</p>
  
  <pre><code>document.location.href = '/EditEncounter/EditEncounter?encounterId=%40id&amp;amp;popId=2'
  </code></pre>