I have this code:
<div class="testexample" style="top:@example.Y px"></div>
I thought this would work fine, but the browser is complaining about the spaces in the style.
(Invalid property value)
Any ideas to solve this?
You can put the whole string inside an expression syntax like this:
<div class="testexample" style="top:@(example.Y + "px")"></div>