Basicamente na sua view você pode fazer: <td id="prefixoTag_@item.seuIdAqui">
Segue um exemplo
Model
public class Fruta
{
public int FrutaId { get; set; }
public string NomeFruta { get; set; }
}
Controller
public IActionResult Index()
{
var listaFruta = new List<Fruta>
{
new Fruta { FrutaId = 1, NomeFruta = "Pera" },
new Fruta { FrutaId = 2, NomeFruta = "Uva" },
new Fruta { FrutaId = 3, NomeFruta = "Maçã" },
new Fruta { FrutaId = 4, NomeFruta = "Salada Mista" }
};
return View(listaFruta);
}
View
@model IEnumerable<WebApplication1.Models.Fruta>
@{
ViewData["Title"] = "Index";
}
<h2>Index</h2>
<p>
<a asp-action="Create">Create New</a>
</p>
<table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.FrutaId)
</th>
<th>
@Html.DisplayNameFor(model => model.NomeFruta)
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model) {
<tr>
<td id="prefixoTag_@item.FrutaId">
@Html.DisplayFor(modelItem => item.FrutaId)
</td>
<td>
@Html.DisplayFor(modelItem => item.NomeFruta)
</td>
</tr>
}
<td id='permiteCertificacao-@relatorioDTO.Identificador'>@relatorioDTO.Nome</td>
@Html.Raw()
?