Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

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>
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #dotnet #core #clickable #row
ADD COMMENT
Topic
Name
9+7 =