Shawn Mclean
Shawn Mclean

Reputation: 57469

Output razor string inside a string literal quotations

How do I do this:

<tr id="[email protected]">

I want the output to look like:

<tr id="paymentId_0">

when item.ItemId is 0.

Upvotes: 18

Views: 9413

Answers (1)

Darin Dimitrov
Darin Dimitrov

Reputation: 1038830

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

Upvotes: 34

Related Questions