This is a part of my .cshtml code:
<div class="mclass">
<div class="MHeader">@s.Name</div>
@foreach (var sc in @s.items)
{
<div class="itemclass" id="{'Item_'[email protected]()}">@sc.itemId</div>
}
</div>
I want to generate dynamic id for itemclass objects with this furmula: id = 'Item_'+ Id (Id of item).
I used above method but not answer correctly.