I’m learning RAZOR.
I need to make an href tag unique, by adding a letter to the start of the #ref:
eg.
<a href="#p23">
In Razor, to populate the href tag from my model, I have:
<a href="#p@item.ID">
However, Razor doesn’t recognise @item.ID, unless it has no characters in front of it.
<a href="#p @item.ID">
But that then invalidates the href.
Is there a way for me to add the letter ‘p’ to this, and still allow RAZOR to add the ID of the item?
Thank you,
Mark
fixit
just put brackets around the item, i.e.
you can do this across all of the razor syntax where required to mix/match