title: ActionLink in jquery table
body: <p>i am new to mvc and jquery,</p>
  
  <p>i have created one table with jquery but i don't know how we add one actionlink in each row and also i need to call one function on the onclick event.</p>
  
  <p>my code is given bellow</p>
  
  <pre><code> function loadData(data) {
  
              var tab = $('&lt;table class="myTable"&gt;&lt;/table&gt;');
              var thead = $('&lt;thead&gt;&lt;/thead&gt;');
              thead.append('&lt;th&gt;Id&lt;/th&gt;&lt;th&gt;&lt;/th&gt;');
              thead.append('&lt;th&gt;Username&lt;/th&gt;');
  
  
  
              tab.append(thead);
              $.each(data, function (i, val) {
  
                  var trow = $('&lt;tr&gt;&lt;/tr&gt;');
                  trow.append('&lt;td&gt;' + val.empID + '&lt;/td&gt;');
                  trow.append('&lt;td&gt;' +"" + '&lt;/td&gt;');
                  trow.append('&lt;td&gt;' + val.empName + '&lt;/td&gt;');
                  trow.append('&lt;td&gt;' + '@Html.ActionLink("Edit", "Edit", new { id = val.empID })' + '&lt;/td&gt;');
  
  
                  tab.append(trow);
              });
  </code></pre>
  
  <p>here i got one error</p>
  
  <p>"val is not in the current context"</p>
  
  <p>please anyone help me to add one actionlink with click event.</p>