Output razor string inside a string literal quotat

2019-06-14 23:35发布

问题:

How do I do this:

<tr id="paymentId_@item.ItemId">

I want the output to look like:

<tr id="paymentId_0">

when item.ItemId is 0.

回答1:

<tr id="paymentId_@(item.ItemId)">