dotnet core clickable row

107

dotnet core clickable row -

<thead>
    <tr>
        <th class="col-sm-2">
            @Html.DisplayName("Report ID")
        </th>
        <th class="col-sm-3">
            @Html.DisplayName("Action")
        </th>
    </tr>
</thead>

@foreach (var item in Model.MyList)
{
    <tr onclick="location.href='@Url.ActionLink("Detail", "ReportController", new { Id = item.ID })'">
        <td>
            @Html.DisplayFor(modelItem => item.ID)
        </td>
        <td>
            @Html.ActionLink("Download", "Download", new { id = item.ID })
        </td>
    </tr>
}

Comments

Submit
0 Comments