I'm trying to learn asp.net and I'm trying to use the ASP routing directly from the tablerow (tr), instead of for each anchor point inside the cell.
Below code, I'm able to click the "Case ID" in my table, but this leaves some unclickable area around the actual text. I basically want to be able to simply select the row and pass the @sc.ID for a database query in the ViewCase-page.I want end-user to click "category" (and several columns in the future), without having to define tags everyhwere.
@foreach (var sc in Model.Cases)
{
<tr asp-area="" asp-page="ViewCase" asp-route-ID="@sc.ID">
<td>
<a asp-area="" asp-page="ViewCase" asp-route-ID="@sc.ID">
Case @Html.DisplayFor(Moldel => @sc.ID)
</a>
</td>
<td>
@Html.DisplayFor(Moldel => @sc.Category)
</td>
</tr>
}