title: jquery datatables actionlink how to add
body: <p>I have been searching for the last few hours, and unfortunately I cannot seem to find an example of how to populate a datatable with an action edit and delete link column using .net and MVC.</p>
  
  <p>Here is what I have so far, how do I add an action link? What am I missing?</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(document).ready(function () {
      $('#myDataTable').dataTable({
          bProcessing: true,
          sAjaxSource: '@Url.Action("Index1", "Default1")'
      });
  
  });
  &lt;/script&gt;
  
  &lt;div id="container"&gt;
  &lt;div id="demo"&gt;
      &lt;table id="myDataTable"&gt;
          &lt;thead&gt;
              &lt;tr&gt;
                  &lt;th&gt;
                      RoleId
                  &lt;/th&gt;
                  &lt;th&gt;
                      RoleName
                  &lt;/th&gt;
                  &lt;th&gt;
                      UserId
                  &lt;/th&gt;
                  &lt;th&gt;
                      UserName
                  &lt;/th&gt;
              &lt;/tr&gt;
          &lt;/thead&gt;
          &lt;tbody&gt; 
          &lt;/tbody&gt;
  &lt;/table&gt;    
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I want to add this in the last column;</p>
  
  <pre><code>    &lt;td&gt;
          @Html.ActionLink("Edit", "Edit", new {id=item.PrimaryKey}) |
          @Html.ActionLink("Details", "Details", new { id=item.PrimaryKey }) |
          @Html.ActionLink("Delete", "Delete", new { id=item.PrimaryKey })
      &lt;/td&gt;
  </code></pre>
  
  <p>But cannot figure out how to do it.</p>