title: How to create a dynamic @Html.ActionLink with JQuery?
body: <p>I'm trying create a dynamic <code>@Html.ActionLink</code> with JQuery and I cannot do this. </p>
  
  <p>How could I do this ?</p>
  
  <p>trying </p>
  
  <pre><code>$('#tableView &gt; tbody').empty();   
      if (data["CategoriaProduto"].length &gt; 0) {
          $.each(data["CategoriaProduto"], function (i, cp) {
              var editLink = $('@Html.ActionLink("Edit", "edit", "CategoriaProduto"), new {id = ' + cp.id + '}');           
  
              $('#tableView &gt; tbody:last-child').append('&lt;tr&gt;'
                                                      + '&lt;td class="text-capitalize small"&gt;' + cp.descricao + '&lt;/td&gt;'
                                                      + '&lt;td class="col-md-1"&gt;' + editLink + '&lt;/td&gt;'
                                                      + '&lt;/tr&gt;');
          });
      }
  </code></pre>