Я настраиваю таблицу с транзакциями и хочу, чтобы можно было печатать каждую транзакцию отдельно одним нажатием кнопки (в основном, печать каждой строки).Но не могу понять, как.
Я пытался найти его в google / stackoverflow, но пока не могу найти то, что ищу.
<table class="table">
<tr>
<th>
@Html.DisplayNameFor(model => model.Clientnumber)
</th>
<th>
@Html.DisplayNameFor(model => model.LicensePlate)
</th>
<th>
@Html.DisplayNameFor(model => model.AccountNumber)
</th>
<th>
@Html.DisplayNameFor(model => model.Amount)
</th>
<th>
@Html.DisplayNameFor(model => model.Date)
</th>
<th>
@Html.DisplayNameFor(model => model.Status)
</th>
<th>
<a>Gegevens Ophalen</a>
</th>
</tr>
@foreach (var item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.Clientnumber)
</td>
<td>
@Html.DisplayFor(modelItem => item.LicensePlate)
</td>
<td>
@Html.DisplayFor(modelItem => item.AccountNumber)
</td>
<td>
@Html.DisplayFor(modelItem => item.Amount)
</td>
<td>
@Html.DisplayFor(modelItem => item.Date)
</td>
<td>
@Html.DisplayFor(modelItem => item.Status)
</td>
<td>
<button id="idButton" class="btn btn-secondary">Print Transactions</button>
</td>
</tr>
}
</table>
Такв конце я хочу иметь возможность нажать кнопку и получить предварительный просмотр строки, в которой находилась кнопка.