title: ASP.NET MVC4: How to hightlight selected row and send id corresponding to controller when click on edit or detail or delete link
body: <p>I need help please. I'm using ASP.NET MVC 4. I have a view(Index.cshtml) that display data in table from sql database using entity framework. I want to know how to hightlight selected row and send specific id(id_equipment) to one html.actionlink for editing, deleting or viewing details.
  Here's my view:</p>
  
  <pre><code>@model IEnumerable&lt;TEST.Models.equipment&gt;
  
  @{
      ViewBag.Title = "Index";
  }
  
  &lt;h2&gt;Index&lt;/h2&gt;
  
  &lt;p&gt;
      @Html.ActionLink("Create New", "Create")
  &lt;/p&gt;
              @Html.ActionLink("Edit", "Edit", new { id = /*item.id_equipment*/ }) |
              @Html.ActionLink("Details", "Details", new { id = /*item.id_equipment*/ }) |
              @Html.ActionLink("Delete", "Delete", new { id = /*item.id_equipment*/ })
  &lt;table&gt;
      &lt;tr&gt;
          &lt;th&gt;
              @Html.DisplayNameFor(model =&gt; model.id_equipment)
          &lt;/th&gt;
          &lt;th&gt;
              @Html.DisplayNameFor(model =&gt; model.name)
          &lt;/th&gt;
          &lt;th&gt;
              @Html.DisplayNameFor(model =&gt; model.type)
          &lt;/th&gt;
      &lt;/tr&gt;
  
  @foreach (var item in Model) {
      &lt;tr&gt;
          &lt;td&gt;
              @Html.DisplayFor(modelItem =&gt; item.id_equipment)
          &lt;/td&gt;
          &lt;td&gt;
              @Html.DisplayFor(modelItem =&gt; item.name)
          &lt;/td&gt;
          &lt;td&gt;
              @Html.DisplayFor(modelItem =&gt; item.type)
          &lt;/td&gt;
      &lt;/tr&gt;
  }
  &lt;/table&gt;
  </code></pre>
  
  <p>Thank you!</p>