title: How to pass anchor tag class Id to a function variable using mvc?
body: <p>I need to pass anchor tag class name <code>ID</code> to a function var <code>ID</code> where var <code>variable ID</code> value should be passed in to the <code>@Url.Action("pharmaCompanyDetails", "PharmaCompany", new { pharmaID = ID })</code></p>
  
  <p>Variable <code>ID</code> value this passed into the <code>pharmaID</code></p>
  
  <p>Code:</p>
  
  <pre><code>&lt;a class="detail" href="javascript:void(0)" title="Detail"&gt;&lt;i class="glyphicon glyphicon-eye-open"&gt;&lt;/i&gt;&lt;/a&gt; 
  </code></pre>
  
  <p>Button Click</p>
  
  <pre><code>'click .detail': function (e, value, row, index) {
                  alert('You click like action, row: ' + JSON.stringify(row.id));
                  var ID = JSON.stringify(row.id);
                  window.location.href = '@Url.Action("pharmaCompanyDetails", "PharmaCompany", new { pharmaID = ID })';
              },
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/NhncJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NhncJ.png" alt="ID"></a></p>