In a web form, this is possible:
<%: quantity %>x
If the quantity is 2, it will display:
2x
In a razor, obviously, I cannot do this:
@quantityx
Because he will look for a quantityx variable that does not exist.
Of course, I can always:
@(quantity.toString + "x")
But I want to know if there is another way? Maybe there is a separator?
source share